This article shares with you the installation of mysql5.7.18 under Centos7.3 and the modification of the initial password for your reference. The specific contents are as follows 1. Official installation documentation http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ 2. Download the MySQL yum package http://dev.mysql.com/downloads/repo/yum/ Download to local and then upload to the server, or use wget to download directly wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm 3. Install the software source Replace platform-and-version-specific-package-name with the name of the rpm you downloaded sudo rpm -Uvh platform-and-version-specific-package-name.rpm For example rpm -Uvh mysql57-community-release-el7-10.noarch.rpm 4. Install MySQL server yum install -y mysql-community-server If the network environment is not very good, you can go make a cup of tea or play a glory kill after executing the command. 5. Start mysql service mysqld start systemctl start mysqld.service 6. Check the running status of mysql service mysqld status systemctl status mysqld.service 7. Change temporary password After Mysql5.7 is installed by default, root has a password. 7.1 Get the temporary password of MySQL To enhance security, MySQL 5.7 randomly generates a password for the root user. In the error log, the location of the error log, if the RPM package is installed, is /var/log/mysqld.log by default. grep 'temporary password' /var/log/mysqld.log The password here is YdsGaxOq>2n! 7.2 Login and change password Log in using the default password mysql -uroot -p After logging in to the server with this password, you must change the password immediately, otherwise the following error will be reported: mysql> select @@log_error; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> Change Password ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123'; If the password is too simple, the following prompt will appear How to solve ERROR 1819 (HY000): Your password does not satisfy the current policy requirements ? The solution is provided directly here. Detailed instructions are given at the end of the article. Two global parameters must be modified: mysql> set global validate_password_policy=0; Change the password length set global validate_password_length=1; Just execute the change password again ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123'; 8. Authorize other machines to log in GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION; FLUSH PRIVILEGES 9. Detailed instructions on password setting ERROR 1819 (HY000): Your password does not satisfy the current policy requirements Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.6 installation tutorials for various versions MySQL 5.7 installation tutorials for various versions mysql8.0 installation tutorials for various versions The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Docker container deployment attempt - multi-container communication (node+mongoDB+nginx)
>>: Global call implementation of Vue2.x Picker on mobile terminal
MySQL 5.7.18 installation and problem summary. I ...
Table of contents 1. How to create an array in Ja...
The detailed installation and configuration of th...
Because springboot has a built-in tomcat server, ...
Table of contents Application Scenario Ideas Proj...
Table of contents Overview The role of reverse pr...
Table of contents 1. Listening for events 2. Pass...
What is CSS# CSS (abbreviation of Cascading Style...
MySQL binlog is a very important log in MySQL log...
Unfortunately, the MYSQL_DATA_TRUNCATED error occ...
Table of contents Introduction to bootstrap and i...
Sometimes the code is lost and you need to recove...
Table of contents 1. Communication method between...
The JD carousel was implemented using pure HTML a...
How to allow remote connection in MySql To achiev...