& Nbsp; 1. stop MySQL Service & nbsp; run:/etc/init. d/mysqlstop, not necessarily/etc/init on your machine. d/mysql may also be/etc/init. d/mysqld & nbsp; 2. skip verification to start MySQL & nbsp;/usr/local/mysql/bin/mysqld_safe -- skip-
1. stop the MySQL service
Run:/etc/init. d/mysql stop, not necessarily/etc/init on your machine. d/mysql may also be/etc/init. d/mysqld 2. skip verification to start MySQL/usr/local/mysql/bin/mysqld_safe -- skip-grant-tables>/dev/null 2> & 1 & note: if the location of mysqld_safe is different from above, you need to change it to yours. if you are not clear about it, you can use the find command to find it. 3. reset the password for a while, and then run:/usr/local/mysql/bin/mysql-u root mysql. after the mysql prompt appears, enter: update user set password = Password (password to be set) where User = root; press enter and run: flush privileges; refresh the table related to MySQL system permissions. Run exit. 4. restart MySQL to killall MySQL process. restart MySQL:/etc/init. d/mysql start.