centos安装mysql8遇到的几个问题

问题1:

Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 111 M RSS (432 MB VSZ)
Started: Wed May 17 20:21:48 2023 - 12:02 ago
State : Sleeping, pid: 15445

输入:

rm -f /var/run/yum.pid

然后重新运行刚才的yum命令即可

问题2:
Public key for mysql-community-common-8.0.33-1.el7.x86_64.rpm is not installed


Failing package is: mysql-community-common-8.0.33-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

原因及解决:

原因是Mysql的GPG升级了,需要重新获取
使用以下命令即可

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

 问题3:

无法远程登录

执行use mysql;
select host from user where user = ‘root’;发下host为localhost,故修改为‘%’:执行update user set host = ‘%’ where user = ‘root’;同时不要忘了执行FLUSH PRIVILEGES 或者重启 MySQL;

 

问题4:

使用DBeaver访问报错:public key retrieval is not allowed

解决办法:

url连接中添加参数或属性配置中配置allowPublicKeyRetrieval=True,作用是允许客户端从服务器自动请求公钥;如图

 至此终于大功告成。

 
 
posted @ 2023-05-17 20:43  ACaptain  阅读(181)  评论(0编辑  收藏  举报