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
Table of contents Vue.js 1. Register global guard...
Table of contents 1. Props Parent >>> Ch...
Apache Tomcat is an open source software that imp...
frame: Style=”border-style:solid;border-width:5px;...
Compared with FTP, SSH-based sftp service has bet...
Result:Implementation code: <!DOCTYPE html>...
Run cmd with administrator privileges slmgr /ipk ...
I have been studying the source code of Vue recen...
I searched for many ways to change it online but ...
Linux change hostname command 1. If you only need...
Unix/Linux Services systemd services Operation pr...
Preface As a front-end framework designed "f...
How to install Linux CentOS 7.7 system in Vmware,...
The temperament of a web front-end website is a fe...
illustrate: Today, when continuing the last offic...