Home  >  Article  >  Database  >  CentOS7 64-bit installation mysql graphic tutorial

CentOS7 64-bit installation mysql graphic tutorial

巴扎黑
巴扎黑Original
2017-05-14 14:20:361302browse

This article mainly introduces the graphic tutorial for CentOS7 64-bit installation mysql in detail, which has certain reference value. Interested friends can refer to it

Prerequisites for installing mysql: Install CentOS 7 64-bit, CentOS 7 system can connect to the network
After completion, open the terminal and check whether mysql has been installed:

Enter # in the terminal


##

yum list installed | grep mysql

As shown below:


CentOS7 64-bit installation mysql graphic tutorial

This shows that mysql has been installed. If it has been installed, uninstall it first. , enter in the terminal:


yum -y remove mysql-libs.x86_64

Delete the installed mysql

After deletion, enter in the terminal:


yum install mysql-community-server

As shown below:

CentOS7 64-bit installation mysql graphic tutorial

This is the beginning of the installation. As long as the system can connect to the network, it will automatically download and install, and yum will automatically handle the dependencies between MySQL and other components

During the automatic installation process, you will be asked to choose whether to continue downloading, etc. Enter y and press Enter as shown below:

CentOS7 64-bit installation mysql graphic tutorial

Until the end, you will be prompted that the installation is complete and All the dependencies that have been installed are as shown below:


CentOS7 64-bit installation mysql graphic tutorial

This means that the installation has been completed. The replacement appears in mine because I did not delete the installed mysql before.

After the installation is complete, enter in the terminal:
systemctl start mysqld
Restart the mysql service, set the initial user name and password, and enter in the terminal:
mysql_secure_installation

CentOS7 64-bit installation mysql graphic tutorial

As shown in the picture above: Generally, after installation, the username is root and the password is empty, so just press Enter after the above picture appears, as shown below:

CentOS7 64-bit installation mysql graphic tutorial

Enter y and press Enter


CentOS7 64-bit installation mysql graphic tutorial

You will be prompted to enter the new password to confirm it again , then keep entering y according to the prompts and press Enter to complete.

If you want to

remotely access MySQL after installing mysql, need to open the default port number 3306. Enter in the terminal: systemctl start mysqld
Restart Start the mysql service, and then enter:


firewall-cmd –permanent –zone=public –add-port=3306/tcp 
firewall-cmd –permanent –zone=public –add-port=3306/udp

These two commands can open port 3306, as shown below:


CentOS7 64-bit installation mysql graphic tutorial

When executing the yum command, I saw: /var/run/yum.pid has been locked, and another program with PID xxxx is running. If this occurs, then


rm -f /var/run/yum.pid

Delete the file and run yum again to make it available.

The above is the detailed content of CentOS7 64-bit installation mysql graphic tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn