The premise is that MYSQLD can handle signals sent by the kill command, such as Sighup, sigterm,sighup signals that produce behavior similar to the flush command.
Do not restart the root password will need to have a lower-privileged account, such as the test library can be modified, or can operate any business database account. This is modified using the test library.
1. Copy the relevant files from the Mysql.user table to the data directory of the test library and modify the permissions:
cd /data/database/mysqlcp mysql/user.* test/ chown mysql:mysql -R test
2, the use of ordinary accounts to modify the Test.user table:
mysql -uadmin -p123456 -S /tmp/mysql.sock mysql> update user set Password=password(‘dd8022bf7a0d1f24‘) where User=‘root‘;
3. Overwrite the modified Test.user table with the Mysql.user table, and note back up the old Mysql.user table:
cd /data/database/mysqlmv test/user.* mysql/
5, to the MYSQLD process SIGHUP signal, refresh permissions:
kill -SIGHUP ${mysqld_pid}
Forgot MySQL root password, how to do not restart the change