Install MySQL on Linux/unix

Source: Internet
Author: User

Next we use the Yum command to install MYSQL under the Centos system:

Detects if the system is installed with MySQL:

-| grep mysql 

If you have a system installed, you can choose to uninstall:

-e mysql//Normal Delete mode--- nodeps mysql//brute force Delete mode, if you use the above command to delete, prompt to have other dependent files, then use this command can be strong delete     

Install MySQL:

Yum install Mysqlyum install MySQL-serveryum install MySQL-devel   

Start MySQL:

Service mysqld Start

Note: If we are starting the MySQL service for the first time, the MySQL server will first initialize the configuration.

In the case of CentOS 7, because the MySQL database has been removed from the default program list, you can use MARIADB instead:

Yum Install mariadb-  

The relevant commands for the MARIADB database are:

Systemctl start mariadb  #启动MariaDBsystemctl stop mariadb  #停止MariaDBsystemctl Restart MARIADB  #重启MariaDB#设置开机启动    
Verifying MySQL Installation

After the successful installation of MySQL, some basic tables will be initialized, after the server starts, you can verify that MySQL is working properly with simple tests.

Use the Mysqladmin tool to get the server status:

Use the mysqladmin command to check the version of the server, on Linux the binary is located on the/usr/bin on Linux, and on the window the binary file is located in C:\mysql\bin.

[email protected]]#--version   

On Linux, the command outputs the following results, based on your system information:

Mysqladmin  Ver8.23distrib5.0.  9-0,for redhat-linux-GNU on i386      

If you do not enter any information after the above command is executed, your MySQL is not installed successfully.

Install MySQL on Linux/unix

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.