PrefaceMake some notes with the help of my colleagues' notes and the pitfalls I encountered during the configuration process. 1. Linux changes the yum source (if MYSQL installation is slow, you can try it)Introduction: Because it is the official yum, it may cause slow installation, so we switch to the domestic source. Step 1: Enter the yum configuration file directory cd /etc/yum.repos.d/ Step 2: Back up the configuration file (to restore it if there is a problem later): mv means: rename cp means: copy mv CentOS-Base.repo CentOS-Base-yum.repo Step 3: Download NetEase yum wget http://mirrors.163.com/.help/CentOS6-Base-163.repo The downloaded file name is: CentOS6-Base-163.repo Rename mv CentOS6-Base-163.repo CentOS-Base.repo Step 4: Update configuration yum update 2. VersionVersion 8.0 wget http://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm Version 5.7 wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm 3. InstallationVersion 8.0 sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm Version 5.7 sudo rpm -ivh mysql5.7-community-release-el7-8.noarch.rpm Install sudo yum install mysql-server Just keep y 4. View the temporary password1. Restart the database systemctl restart mysqld 2. View the temporary password generated by the log grep "A temporary password" /var/log/mysqld.log 3. Change the password (you will encounter pitfalls, you can see the questions at the end) to enter the database mysql -u root -p Enter the temporary password to enter the database Change password length If it is root, it is 4 set global validate_password.length=4; Modify the complexity set global validate_password.policy=0; The modified account and password can be consistent (if different, no configuration is required) set global validate_password.check_user_name=off; Revise ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password'; Exit Database exit 5. Configure external network access1. Enter the database mysql -u root -p Enter the password to enter the database 2. Enter the MySQL database use mysql; 3. Configure access permissions update user set host='%' where user='root'; 4. Refresh permissions flush privileges; 5. Exit the database exit 6. Reboot systemctl restart mysqld 6. Testing7. Database Uninstallation1. View the installed mysql rpm -qa | grep -i mysql 2. Uninstall yum remove name 3. Delete data rm -rf /var/lib/mysql 8. QuestionsTai Chi situation When I first entered the database, I couldn't change the password or the password length. Both sides blamed each other and played Tai Chi. Solution (it means to change the password first) 1. Change the password to the generated password first Mine is: +Eiyth9dW7ba ALTER USER 'root'@'localhost' IDENTIFIED BY 'Generate password'; 2. Modify the minimum length Modify according to your password length set global validate_password.length=4; 3. Modify the complexity set global validate_password.policy=0; 4. Change password ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password'; SummarizeMake some notes with the help of my colleagues' notes and the pitfalls I encountered during the configuration process. This is the end of this article about the process of installing MySQL 8.0 in Linux environment. For more relevant content about installing MySQL 8.0 in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Talking about the use of CSS3 custom variables in projects from a project reconstruction
>>: Solution to the garbled problem of web pages when the encoding is set to utf-8
JSON data is displayed and formatted on the HTML ...
This article example shares the specific code of ...
The operating environment of this tutorial: Windo...
Html semantics seems to be a commonplace issue. G...
Payment countdown to return to the home page case...
Docker is an open source engine that makes it eas...
1. What is Docker? (1) Docker is an open source t...
This article shares the specific code of js to im...
【1】<i></i> and <em></em> ...
Preface At work, I need to count the materials su...
Table of contents need Core Idea Two ways to impl...
Common utf8mb4 sorting rules in MySQL are: utf8mb...
introduce Have you ever spent a whole day trying ...
This article shares the specific code of the vue3...