1. Check to see if a MySQL database is available:
#rpm-qa |grep MySQL
Command returned empty, stating that no installation was successful.
2. Install MySQL
Yum Install mysql*
When the installation is complete, only JDBC and ODBC drivers are found.
3. Installing the MARIADB Database
Yum Install mariadb*
(the MySQL database was replaced with MARIADB in CENTOS7.) )
4. Start mariadb:
Systemctl Start mariadb
5. Operation MARIADB Database: (password is empty, in the location of the input password, directly enter, press ENTER key)
[Email protected] yl]# mysql-u root-penter password:welcome to the MariaDB Monitor. Commands End With; MariaDB Connection ID is 3Server version:5.5.41-mariadb MariaDB servercopyright (c) \g.your, Oracle, Mariad B Corporation Ab and others. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement. MariaDB [(None)]> show databases;+--------------------+| Database |+--------------------+| information_schema | | mysql | | performance_schema | | Test |+---------- ----------+rows in Set (0.00 sec) MariaDB [(None)]>
Appendix:
MARIADB database Common commands are as follows:
Systemctl Start mariadb #启动
Mariadbsystemctl Stop mariadb #停止
Mariadbsystemctl Restart MARIADB #重启
Mariadbsystemctl Enable MARIADB #设置开机启动
Installing MySQL database in CentOS