错误:MySQL ERROR 1698 (28000)
1. 查看一下user表
错误的起因就是在这里, root的plugin被修改成了auth_socket,
用密码登陆的plugin应该是mysql_native_password。
mysql> select user, plugin from mysql.user;
2.命令:
mysql> update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
3.重启服务,问题就解决了
错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
问题原因:
mysql 服务停掉了,启动就可以了
1. 查看一下user表
错误的起因就是在这里, root的plugin被修改成了auth_socket,
用密码登陆的plugin应该是mysql_native_password。
mysql> select user, plugin from mysql.user;
2.命令:
mysql> update mysql.user set authentication_string=PASSWORD('newPwd'), plugin='mysql_native_password' where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
3.重启服务,问题就解决了
错误:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
问题原因:
mysql 服务停掉了,启动就可以了