1. Preparation before installation Check the database version command: mysql-community-common-8.0.17-1.el7.x86_64.rpm mysql-community-libs-8.0.17-1.el7.x86_64.rpm mysql-community-client-8.0.17-1.el7.x86_64.rpm mysql-community-server-8.0.17-1.el7.x86_64.rpm 2. Install the RPM package Install the above RPM packages in sequence. The previous and next installation packages are dependent on each other. # rpm -ivh mysql-community-common-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-libs-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-client-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-server-8.0.17-1.el7.x86_64.rpm 3. Query the initial password of the root account The initial password of MySQL version 8.0 is not empty by default. It is automatically generated during installation and stored in # rpm -ivh mysql-community-common-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-libs-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-client-8.0.17-1.el7.x86_64.rpm # rpm -ivh mysql-community-server-8.0.17-1.el7.x86_64.rpm 4. Change the root password There are default security requirements for changing passwords, and there are controls on password complexity. mysql> alter user 'root'@'localhost' identified by 'redhat'; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements mysql> alter user 'root'@'localhost' identified by '1qaz!QAZ'; Query OK, 0 rows affected (0.15 sec) mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) 5. View current user configuration information mysql> show databases; mysql> use mysql; mysql> select user,host,plugin from user; 6. Create a new user for remote access mysql> create user 'wangwang'@'%' identified by '1qaz!QAZ'; Query OK, 0 rows affected (0.08 sec) mysql> grant all on *.* to 'wangwang'@'%'; Query OK, 0 rows affected (0.12 sec) mysql> select user,host,plugin from user; The plugin encryption method for this account is caching_sha2_password. When a client running before MySQL 8.0 connects to a MySQL 8.0 server, an error message stating that Authentication plugin 'caching_sha2_password' cannot be loaded will appear (it needs to be changed to mysql_native_password). 7. Modify the encryption method Modify encryption rules mysql> alter user 'wangwang'@'%' identified by '1qaz!QAZ' password expire never; Query OK, 0 rows affected (0.17 sec) Update User Password mysql> alter user 'wangwang'@'%' identified with mysql_native_password by '1qaz!QAZ'; Query OK, 0 rows affected (0.04 sec) Save changes mysql> flush privileges; Query OK, 0 rows affected (0.05 sec) Query information mysql> select user,host,plugin from user; 8. Test the connection You can use Navicat to test it. Summarize The above is the method I introduced to you to install MySQL 8.0.17 and configure remote access. I hope it will be helpful to you. If you have any questions, please leave me a message and I 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:
|
<<: js learning notes: class, super and extends keywords
>>: In IIS 7.5, HTML supports the include function like SHTML (add module mapping)
Problems that may arise from optimization Optimiz...
Here is a case study on how to close ads using Ja...
Click here to return to the 123WORDPRESS.COM HTML ...
<br />We usually declare DOCTYPE in HTML in ...
Judgment symbols are often used in MySQL, and not...
1. Download the installation package -Choose the ...
This article records the installation tutorial of...
Table of contents Install mockjs in your project ...
Preface In actual projects, the most common proce...
MySQL installation tutorial for Windows system do...
If you want to adjust the size and number of Inno...
Preface The most common task after we install a L...
Table of contents What is front-end routing? How ...
Question Guide 1. How does Hadoop 3.x tolerate fa...
Table of contents Component recursive call Using ...