MySQL installation tutorial under Centos7
The command for installing mysql is as follows:
# Wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# Rpm-ivh mysql-community-release-el7-5.noarch.rpm
# Yum install mysql-community-server
The system automatically installs the tool. Finally, a message is displayed, indicating that the installation is successful. MySQL installation tutorial under Centos7
After installation, restart the mysql service:
# Service mysqld restart
Will output: Redirecting to/bin/systemctl restart mysqld. service
Run the command # netstat-atp to check that the mysqld process has started listening:
This indicates that mysql can be used now. You can directly enter mysql to connect to the server. For details, see:
In this case, you can directly connect without entering the user and password.
Add a user's password: set password for 'root' @ 'localhost' = password ('xxx ');
Then you need to enter the password to connect to the database: