Home  >  Article  >  Database  >  How to build mysql with xshell

How to build mysql with xshell

coldplay.xixi
coldplay.xixiOriginal
2020-10-21 16:10:484863browse

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.

How to build mysql with xshell

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

How to build mysql with xshell

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

How to build mysql with xshell

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

How to build mysql with xshell

Solution:

How to build mysql with xshell

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn