1:Authentication plugin 'caching_sha2_password' cannot be loaded
ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
2:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
今天,我要登录mysql
mysql -u root -p
但返回标题的错误
解决:
我cd
到mysql的bin
目录下,用以下
sudo ./mysql.server start
返回
Starting MySQL
SUCCESS!
启动mysql服务就好了
然后再
mysql -u root -p
网友评论