cenos7 installation mysql8.0 and problem solving

1: Install user name must not (otherwise visual errors) when cenos7 to root
cenos7 detailed steps to install mysql8.0
2: When you install mysql by the amount of domestic use yum cloud, as fast
if mysql fails to start
1. Check the error Code
Here Insert Picture Description
execution journalctl -xe watch on issues relating to mysql
2. If not recommend uninstalling mysql reinstall the
uninstall step
1. Turn off mysql

[root@localhost /]# service mysqld stop
Redirecting to /bin/systemctl stop  mysqld.service

2. Check the mysql installation

[root@localhost /]# rpm -qa|grep -i mysql
mysql-community-server-8.0.19-1.el7.x86_64
mysql-community-common-8.0.19-1.el7.x86_64
mysql80-community-release-el7-3.noarch
mysql-community-client-8.0.19-1.el7.x86_64
mysql-community-libs-8.0.19-1.el7.x86_64

3. Uninstall
execute the command to delete the installation of MySQL

[root@localhost /]# rpm -ev mysql-community-client-8.0.13-1.el7.x86_64
报错:error: Failed dependencies:
mysql-community-client(x86-64) >= 8.0.0 is needed by (installed) mysql-community-server-8.0.13-1.el7.x86_64
原

Due to dependencies is wrong, and then execute the following command to solve:

[root@localhost /]# rpm -ev mysql-community-client-8.0.13-1.el7.x86_64 --nodeps

The remaining few are also in accordance with the above-mentioned operation is performed, plus --nodeps
then execute # rpm -qa | grep -i mysql command to check whether deleted successfully.

[root@localhost /]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
/usr/share/mysql
[root@localhost /]# rm -rf /var/lib/mysql
[root@localhost /]# rm -rf /var/lib/mysql/mysql
[root@localhost /]# rm -rf /usr/lib64/mysql
[root@localhost /]# rm -rf /usr/share/mysql

4: Remove my.cnf
after uninstalling /etc/my.cnf does not remove the need to manually delete

[root@localhost /]# rm -rf /etc/my.cnf

Finally, check to see if the uninstallation is completed, no results indicate that uninstall is complete.

[root@localhost /]# rpm -qa|grep -i mysql
Released five original articles · won praise 0 · Views 42

Guess you like

Origin blog.csdn.net/weixin_45793409/article/details/104771936