Linux CentOS MySQL database installation and configuration tutorial, centos installation and configuration tutorial
Notes on installing the mysql database
A) download the mysql source installation package: wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
B) install mysql Source: yum localinstall mysql57-community-release-el7-8.noarch.rpm
If the end of a complete appears !, The MySQL source is installed successfully.
C) check whether the installation is complete: yum repolist enabled | grep "mysql. *-community .*"
D) install mysql: yum install mysql-community-server
If the end of a Complete appears !, MySQL installation is complete.
E) set to enable mysql service: systemctl enable mysqld
F) view the installed mysql version: rpm-aq | grep-I mysql
G) Start the MySQL service: systemctl restart mysqld
H) Check the MySQL initial password: grep 'a temporary password'/var/log/mysqld. log
I) change the MySQL password: mysqladmin-u root-p 'old password 'Password' new password'
An error occurred while changing the password. This is because the password is too simple. There are two solutions:
Method 1:Set the password complexity (this is the most direct method)
Method 2:Disable mysql password Strength Verification (validate_password)
Edit the configuration file vim/etc/my. cnf and add the line validate_password = off.
After editing, restart the mysql service: systemctl restart mysqld.
J) set remote access to mysql:
Log on to MySQL: mysql-uroot-p Password
Add a user to grant the access permission: grant all privileges on *. * to 'root' @ 'IP address' identified by 'Password' with grant option; // you can change the ip address to %, indicating that all
OK. Try my local connection.
Well, it's over here. I wish you a different BUG.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.