Installing MySQL database in CentOS

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.