1. First check whether the system has mysql installed rpm -qa | grep mysql 2. Download the mysql repo source (5.7) wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm If the error is: -bash: wget: command not found Install the plugin 3. Install sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 4. Install MySQL sudo yum install mysql-server 5. Reset MySQL password Check the running status of MySQL, as shown in the figure: systemctl status mysqld.service At this point, MySQL has started running normally, but to enter MySQL, you must first find out the password of the root user. You can find the password in the log file using the following command: grep "password" /var/log/mysqld.log Enter the database using the following command: mysql -uroot -p Enter the initial password (Es9akjRtrd<4 at the end of the picture above). You cannot do anything at this time because MySQL requires you to change the password before you can operate the database: ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password'; Replace 'new password' with the password you want to set. Note: The password must contain uppercase and lowercase letters, numbers, and special symbols (,/';:, etc.), otherwise the configuration will fail. 6. Restart MySQL service service mysqld restart Then set the remote connection password for the Root account. Both the account and password are root. mysql -u root -p GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY " your password "; Restart the server service mysqld restart 7. Use external network tools to connect to MySQL The username and password to connect to mysql are both root Turn off firewall systemctl stop firewalld.service This is the end of this article about installing MySql on CentOS7.5. For more information about installing MySql on CentOS7.5, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Let's learn about JavaScript object-oriented
>>: How to use MySQL group by and order by together
Text hiding code, hide a certain text in HTML Copy...
Common points: The DIV tag and SPAN tag treat som...
Table of contents WXS Response Event Plan A Page ...
Table of contents 1. Overview 1.1 What is strict ...
Table of contents App Update Process Rough flow c...
1. Construction 1. Prepare htpasswd.txt file The ...
<br />Since the Ministry of Foreign Affairs ...
Preface Recently, when working on a high-availabi...
Table of contents Requirements: Implementation st...
Table of contents Index Type Index structure Nonc...
The solution to the transparent font problem after...
1.fullpage.js Download address https://github.com...
Preface Application scenario: probably the intern...
When searching online for methods to install MySQ...
Today, we use uniapp to integrate Echarts to disp...