If you forget your MYSQL root password, you can recover it through the following process. 1. send the kill command to mysqldserver to disable mysqldserver (not kill-9). the files that store the process ID are usually located in the directory of the MYSQL database. Kill 'catmysql-data-directoryhostname.pid 'you must be a UNIX root user or if you forget your MYSQL root password, you can recover through the following process.
1. send the kill command to the mysqld server to disable the mysqld server (not kill-9). the files that store the process ID are usually located in the directory of the MYSQL database.
Kill 'cat/mysql-data-directory/hostname. Pi'
You must be a UNIX root user or an equivalent user on the SERVER you run to perform this operation.
2. use the '-- skip-grant-tables' parameter to start mysqld.
3. use the 'MySQL-h hostname mysql' command to log on to the mysqld server and use the grant command to change the password. You can also do this: 'mysqladmin-h hostname-u user password' new password '.
(You can also use mysql; update user set password = password ('yourpass') where user = 'root .)
4. load the permission table: 'mysqladmin-h hostname flush-privileges ', or use the SQL command 'flush privileges '. (Of course, you can restart mysqld here .)
SonyMusic (sonymusic@163.net) translation