xshell method to build mysql: first install the repo; then start mysql and obtain the temporary password; then log in to mysql and change the temporary password to your own password; finally log in with the modified password. Can.
xshell method to build mysql:
#1. There is no mysql package to download from the official website. You need to go to Download the yum repo configuration file from the official website of mysql.
2. Check if there is a mysql file package in /opt
3. Repo Installation:
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
4, view/etc/yum.repos.d Are two repo files mysql-community.repo and mysql-community-source.repo
#5. Use the yum command to complete the installation
yum install mysql-server
6. Start mysql
systemctl start mysqld
7. Get the temporary password
grep 'temporary password' /var/log/mysqld.log
7.1 If the temporary password is not obtained, delete the remaining data of the originally installed mysql
rm -rf /var/lib/mysql
7.2 Restart msql
8. Log in to mysql
mysql -u root -p
9. Change the temporary password to your own password
set password=password("yourpassword");
Key point: go to step nine Many people will have this problem
Solution:
10. Exit mysql
quit
11. Log in with the modified password
More related free learning recommendations:mysql tutorial(Video)
The above is the detailed content of How to build mysql with xshell. For more information, please follow other related articles on the PHP Chinese website!