Starting with the CENTOS7 version, in order to maintain a better open source, the system minimized version of the default database becomes MARIADB, but in order to experiment, the decision to install MySQL (after all, the storage engine is different, although the MARIADB is well compatible with MySQL), The following describes how to install.
The first MySQL version that needs to be installed is 6.0,:http://mysql.mirrors.pair.com/downloads/mysql-6.0/(with RPM package installation).
1. Uninstalling MARIADB
At the beginning of the installation because there is no uninstall the system comes with MARIADB, install mysql-server when the installation directory conflict error, uninstall the following method:
Rpm-qa | grep mariadb #得到mariadb的rpm包名
RPM-E--nodeps RPM Package Name
2. Turn off SELinux
Cat/etc/selinux/config
Change the SELinux value from the original enforce to selinux=disabled, then restart the computer (I use the source command to get the configuration file to take effect immediately, but seemingly no effect, I hope to find a better way)
3. Installing PERL-DBI
Yum Install PERL-DBI
4. Installing mysql6.0
Since my host is an Intel CPU, here are three installation packages, followed by the following three installation packages:
MYSQL-SERVER-6.0.11-0.GLIBC23.X86_64.RPM (if the installation is successful, you will be prompted success! MySQL running)
mysql-client-6.0.11-0.glibc23.x86_64.rpm
mysql-devel-6.0.11-0.glibc23.x86_64.rpm
Available Rpm-qa | grep MySQL to see if the installation was successful:
Mysql-client-6.0.11-0.glibc23.x86_64
Mysql-server-6.0.11-0.glibc23.x86_64
Mysql-devel-6.0.11-0.glibc23.x86_64
5. Initialize root password
mysqladmin-u Root Password New password
6. Check the boot status
Chkconfig--list MySQL (note: This output shows only the SysV service and does not contain the native SYSTEMD service.) SysV configuration data may be overwritten by native SYSTEMD configuration. You can use Systemctl list-unit-files to list native services, or use SYSTEMCTL list-dependencies [target] to view services enabled for a specific target)
MySQL 0:off 1:off 2:on 3:on 4:on 5:on 6:off
CentOS Installation mysql.rpm