วิธีซ่อมแซ่ม Database MySQL ง่ายๆด้วย myisamchk
วิธีซ่อมแซม Database ง่ายๆ (Repair Database) ด้วยการเข้า SSH แล้วไปยังโฟลเดอร์ mysql ที่ OS Linux แต่ละอย่างเก็บไว้ Debian myisamchk -r /home/mysql/*/..
Ploblem: forget MySQL root password
Solutions: Recover(hack) MySQL root password
1. Login as root
2. Stop the MySQL server by using command
/etc/init.d/mysql stop
#or
ps aux | grep mysql
kill -9 #mysqlID
3. Start MySQL server without password
mysqld_safe --skip-grant-tables &
#/usr/local/mysql/bin/mysqld_safe --skip-grant-tables &
4.Connect to mysql server using mysql client
mysql -u root
5. Now you need to Setup new MySQL root user password
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where user='root';
mysql> flush privileges;
mysql> quit
6. Restart MySQL
/etc/init.d/mysql stop
/etc/init.d/mysql start
October 15, 2009
Blog | #Command #Database #Linux #MySQL
วิธีซ่อมแซม Database ง่ายๆ (Repair Database) ด้วยการเข้า SSH แล้วไปยังโฟลเดอร์ mysql ที่ OS Linux แต่ละอย่างเก็บไว้ Debian myisamchk -r /home/mysql/*/..
1.At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode. 2.You are present..
หลังจากที่เราใช้ MySQL Tunner ไปแล้ว พบว่า จำเป็นต้อง optimize tables แต่จะทำไงให้ optimize database ได้ทุกตาราง ซึ่งมีวิธีง่ายๆ สามารถใช้คำสั่งนี้ในก..
พักนี้ขอวุ่นๆเรื่อง MySQL หน่อย เพราะว่า Dedicated Server ของลูกค้าๆ จะกิน MySQL ขึ้นมาหน่อยนึง เลยต้องมีอุปกรณ์ที่ช่วยจูน MySQL ให้เหมาะสมกับเครื่อง ..
find mysqld.log/mysql.log & slowly log file in DirectAdmin(Debian) 1.Login mysql command mysql -u dbuser -p 2.Query mysql variables mysql> show variab..
1.Login msyql command mode and query mysql check character below mysql> show variables like %character%;show variables like %collation%; 2.edit my..