-
出现mariadb-libs is obsoleted by mysql-community-libs-8.0.28-1.el7.x86_64
,需要移除mariadb
执行yum remove mysql-libs
-
Yum安装出现Error: Package: mysql-community-client-plugins-8.0.29-1.el6.x86_64 (mysql80-community) Requires: libsasl2.so.2()(64bit)
或Error: Package: mysql-community-client-plugins-8.0.29-1.el6.x86_64 (mysql80-community) Requires: libudev.so.0()(64bit)
,检查/etc/yum.repos.d/mysql-community.repo
,官方给的是el6
版本的源。
如果使用的是Centos7
,将baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/6/$basearch/
改为baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/
-
出现GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022"
,有两种解决办法:
- 更改
/etc/yum.repos.d/mysql-community.repo
,将gpgcheck
值改为0
- 将
gpgkey
存储在/etc/yum.repos.d/mysql-community.repo
,指定的目录。如果本地不存在执行sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
进行下载
-
出现GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql"
,有两种解决办法:
- 更改
/etc/yum.repos.d/mysql-community.repo
,将gpgcheck
值改为0
- 将
gpgkey
存储在/etc/yum.repos.d/mysql-community.repo
,指定的目录。如果本地不存在执行sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql https://repo.mysql.com/RPM-GPG-KEY-mysql
进行下载
-
出现Can't create test file /data/mysql/mysqld_tmp_file_case_insensitive_test.lower-test
,需要关闭系统SELinux
-
远程无法连接,执行以下操作:
create user 'root'@'%' identified by '123456';
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
-
/etc/init.d/mysqld: line 239: my_print_defaults: command not found
,编辑support-files/mysql.server
,将basedir
和datadir
补充完整即可。
-
You must reset your password using ALTER USER statement before executing this statement
初次需要修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';