This example requires downloading and installing the debugging MySQL database. Step 1: Download all the software required to install the MySQL database. I have downloaded the database software in advance, and I can download it directly on the server, as follows: Download directly via scp: The software is as follows: [root@agt20 ~]# ls mysql-* mysql-5.7.17.tar mysql-community-client-5.7.17-1.el7.x86_64.rpm mysql-community-common-5.7.17-1.el7.x86_64.rpm mysql-community-devel-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-compat-5.7.17-1.el7.x86_64.rpm mysql-community-embedded-devel-5.7.17-1.el7.x86_64.rpm mysql-community-libs-5.7.17-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.17-1.el7.x86_64.rpm mysql-community-minimal-debuginfo-5.7.17-1.el7.x86_64.rpm mysql-community-server-5.7.17-1.el7.x86_64.rpm mysql-community-test-5.7.17-1.el7.x86_64.rpm Step 2: Install through yum, start the server and view [root@agt20 ~]# yum -y install mysql-*.rpm [root@agt20 ~]# systemctl restart mysqld [root@agt20 ~]# systemctl enable mysqld [root@agt20 ~]# systemctl status mysqld.service mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since \u4e8c 2019-10-15 11:29:11 CST; 1min 15s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Main PID: 31584 (mysqld) CGroup: /system.slice/mysqld.service \u2514\u250031584 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid... 10\u6708 15 11:28:42 agt20.tedu.cn systemd[1]: Starting MySQL Server... 10\u6708 15 11:29:11 agt20.tedu.cn systemd[1]: Started MySQL Server. [root@agt20 ~]# Step 3: Connect to MySQL server and change password; 1) View the initial password [root@agt20 ~]# grep -i 'password' /var/log/mysqld.log 2019-10-15T03:28:55.200931Z 1 [Note] A temporary password is generated for root@localhost: r3qhDysMrM) 2) Use the initial password to connect to the MySQL service [root@agt20 ~]# mysql -uroot -p'r3qhDysMrM)' mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> 3) Reset the local login password of the database administrator roo mysql> alter user root@localhost identified by 'Pwd@123...'; Query OK, 0 rows affected (0.00 sec) 4) Modify password policy mysql> set global validate_password_policy=0; Query OK, 0 rows affected (0.01 sec) mysql> set global validate_password_length=6; Query OK, 0 rows affected (0.00 sec) mysql> alter user root@localhost identified by 'pwd@123'; Query OK, 0 rows affected (0.00 sec) 5) Log in using the changed password [root@agt20 ~]# mysql -uroot -ppwd@123 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.7.17 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> At this point, the installation and debugging of the Mysql database is completed! ! ! ! Summarize The above is the detailed steps of installing and debugging MySQL database on CentOS7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Summary of MySQL time statistics methods
>>: vue-router history mode server-side configuration process record
Find the problem Today I am going to study the to...
Table of contents 1. Pull the image 2. Run the im...
A few days ago, I wrote an article about using CS...
Code Knowledge Points 1. Combine fullpage.js to a...
<br />Navigation design is one of the main t...
Solution 1 Completely uninstall and delete all da...
If you want to transfer files between Windows and...
(1) HTML: HyperText Markup Language, which mainly...
Scrcpy Installation snap install scrcpy adb servi...
Div basic layout <div class="main"&g...
Table of contents Example Code Rendering Code Ana...
introduction With the widespread popularity of In...
Table of contents 1. Communication method between...
Related system calls for file operations create i...
This article introduces the installation and use ...