Yum Install Mariadb-server mariadb-client
Tip: Mysql-server-5.1.73-8.el6_8.x86_64 was supposed to being removed is not!
Since the installation of the operating system, MySQL also installed a piece, but the installation of MARIADB does not uninstall the previous installation of MySQL, resulting in mariadb installation failure.
1, first find out the installed MySQL package
[Email protected] ~]# Rpm-qa | Grep-i ' ^mysql-'
Mysql-server-5.1.73-8.el6_8.x86_64
2. If MySQL is on, turn it off first
[[email protected] ~]#/etc/init.d/mysqld stop
Stopping mysqld: [OK]
3. Uninstall and install the MySQL package
[Email protected] ~]# rpm--nodeps-ev mysql-server-5.1.73-8.el6_8.x86_64
4. Check if MySQL is uninstalled
[Email protected] ~]# Rpm-qa | Grep-i ' ^mysql-'
There are no MySQL-related packages that are not displayed, and have been uninstalled.
5. Re-execute MARIADB installation
Yum Install Mariadb-server mariadb-client
6. View the files generated by the installation mariadb
[Email protected] ~]# RPM-QL mariadb-server
/etc/init.d/mysql
/etc/logrotate.d/mysql
/etc/my.cnf.d
/etc/my.cnf.d/server.cnf
....
7. Start the service
[[email protected] ~]#/etc/init.d/mysql start
Starting mysql.180120 16:22:20 mysqld_safe Logging to '/var/lib/mysql/centos6_103.sunan.err '.
180120 16:22:20 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql
... [OK]
[Email protected] ~]# Ss-ntl
State recv-q send-q Local address:port Peer address:port
LISTEN 0 *:3306 *:*
LISTEN 0 *:57007 *:*
LISTEN 0::: 111:::*
See Port 3306 is turned on
8. View the installed version
[[email protected] ~]# MySQL--version
MySQL Ver 15.1 distrib 5.5.59-mariadb, for Linux (x86_64) using ReadLine 5.1
centos6.9 installation mariadb failure and solution