MySQL installation under CentOS 7
1. Guide package
Windows
CentOS
Two, install MySQL
Install perl
yum install perl -y
install client
rpm -ivh MySQL-client-5.6.46-1.el7.x86_64.rpm
install autoconf
yum install autoconf -y
install server-side
rpm -ivh MySQL-server-5.6.46-1 .el7.x86_64.rpm
remember the last line of
uninstall
rpm -e mariadb-libs-1:5.5.68-1.el7.x86_64 --nodeps
and reinstall the server side
rpm -ivh MySQL-server-5.6.46-1 .el7.x86_64.rpm
after successful installation
Find MySQL initial password
Enter the [.mysql_secret] file to view the last string of English strings [: the latter]
vi /root/.mysql_secret
Three, run MySQL
service mysql start-service start
mysql-start mysql program
mysql -u username -p password-login
set password=password("password");-modify the password
[Note: all at the end of the mysql statement;]
After the modification, use: quit; exit and
log in again with the new password
Fourth, the problems encountered during installation
What should I do if I want to reinstall the wrong installation? Be sure to uninstall clean
1. Use yum to install mysql, use the following command to uninstall
yum remove mysql mysql-server mysql-libs compat-mysql51
rm -rf /var/lib/mysq
rm /etc/my.cnf
2. Use the mysql installed by rpm, use the following command to uninstall
rpm -qa | grep -i mysql
Use the rpm -e command to uninstall the package list in the previous command one by one.
Delete mysql service
chkconfig --list | grep -i mysql
chkconfig --del mysql
Then find out the scattered mysql folders in the OS and delete them.
find / -name mysql
rm -rf these files
Try to try both! ! !