1. DBeaver连接MySQL报Public Key Retrieval is not allowed 错误的解决方法
将 Driver properties 中的allowPublicKeyRetrieval 的value 改为 True即可。
2. MySQL登录时报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)的问题
解法:
1.停止mysql数据库:systemctl stop mysqld
2.用以下命令启动MySQL,以不检查权限的方式启动:
mysqld --skip-grant-tables &
此时又报了一个错误:2018-02-01T02:52:55.093724Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
执行命令:mysqld --user=root --skip-grant-tables &
3.登录mysql:mysql -uroot或mysql
4.更新root密码
mysql5.7以下版本:UPDATE mysql.user SET Password=PASSWORD('123456') where USER='root';
mysql5.7版本:UPDATE mysql.user SET authentication_string=PASSWORD('123456') where USER='root';
5.刷新权限:flush privileges;
6.退出mysql:exit或quit
7.使用root用户重新登录mysql
mysql -u root -p
Enter password:<输入新设的密码123456>
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)