Mysql cannot be connected, logon, shutdown, and other problems
Now there is a problem with mysql: 1: Client Connection: Can't connect to MySQL server on '10. 14.39.220 '2. log on to the local server. mysql-uroot-phqnERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using Password: YES) cannot log on to mysql3. stop mysql: sudo/etc/init. d/mysql stopStopping MySQL database server: mysqld failed!
My solution: a unique solution. Since mysql cannot be stopped normally, it can only be forced to stop and kill the thread. 1. find the thread: ps aux | grep mysql2. kill thread: sudo kill 91503. enable the skip authorization mode mysqld_safe -- user = mysql -- skip-grant-tables -- skip-networking & 4. log on to mysqlmysql-u root mysql as follows:
After logging on to mysql, check the mysql account password: select host, user, passwZ login? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> vcmQgZnJvbSBteXNxbC51c2VyOwo8aW1nIHNyYz0 =" http://www.2cto.com/uploadfile/Collfiles/20140804/2014080410244520.png "alt =" \ ">
3. Change the root password through the command line:
Mysql> UPDATE mysql. user SET password = PASSWORD ("new password") WHERE User = 'root ';
Mysql> flush privileges;
4. I have fixed all the problems that have been solved for a long time. I should stop having problems with mysql. Describes the solution process in detail. After logging on to musql in non-authorization mode, I checked the mysql account and password: (1) select host, user, password from mysql. user;
(2) As expected, I changed the password mysql> UPDATE mysql. user SET PASSWORD = password ("geopass ') WHERE User = 'root ';
Mysql> FLUSH PRIVILEGES. (3) after I came out, I tried to test whether the password was changed. As a result, the password changed to my password. So I tried to change the remote login permission so that anyone could log on to mysql.>Grant all privileges on *. * TO 'root' @ '%' with grant option; mysql>Flush privileges; mysql>The EXIT operation was miraculously successful this time and cannot be modified in the past.
(4) Then I quit mysql and want to restart myqsl sudo/etc/init. d/mysql stop; restart failed, and then try to forcibly kill the mysql process ps aux "grep mysql sudo kill 13027. If the killing fails, I will re-view the mysql process, the result is that one process is missing, and the few processes are not killed by me. Then I will explain how to stop the mysql process sudo/etc/init. d/mysql stop; it actually stops successfully.
(5) Enable the mysql process to view the process and find that the mysql process disappears. I log on to mysqlmysql-uroot-pgopass successfully.
(6) Check the password. I still don't know what the password is, but the client can access it.