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)
This article shares the specific code of JS to ac...
This article example shares the specific code of ...
background In order to support Docker containeriz...
1. When inserting, updating, or removing DOM elem...
This article example shares the specific code of ...
This article shares with you how to use Vue to im...
For historical reasons, MySQL replication is base...
Nginx can use its reverse proxy function to imple...
Query mysql operation information show status -- ...
FileReader is an important API for front-end file...
Find the problem After upgrading MySQL to MySQL 5...
Preface: Because many business tables use design ...
Enable remote access to MySQL By default, MySQL u...
First of all, we need to make it clear why we use...
Steps: 1. Install MySQL database 1. Download the ...