Preface Here are the steps to install and configure MySQL on CentOS; text Download the installation package from the yum source yum localinstall https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm Install yum install mysql-community-server Start the service service mysqld start View Status service mysqld status View initial password grep 'temporary password' /var/log/mysqld.log Login Change Password mysql -uroot -p The password is the one found above. Then enter the command Enter the mysql database Change Password ALTER USER 'root'@'localhost' IDENTIFIED BY 'your password'; At this point, the installation and configuration on the server has been completed. However, when you connect remotely, you find that the connection is not successful. The reason may be that the server port 3306 is not open to the outside world; the database user does not have remote connection login permissions; Configure MySQL to allow external access Enter the mysql database use mysql Modify the user table of the mysql database and change the host item from localhost to %. %This means that any host is allowed to access. If only a certain IP is allowed to access, you can change it to the corresponding IP. GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; FLUSH PRIVILEGES; Test the remote connection again and the connection is successful. Summarize The above are the steps for installing and configuring MySQL 8.0 on CentOS 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:
|
<<: Detailed explanation of Linux curl form login or submission and cookie usage
>>: How to understand JS function anti-shake and function throttling
This article example shares the specific code of ...
When we check the source code of many websites, w...
Table of contents 1. lazy 2.trim 3.number 4.stop ...
This article uses an example to illustrate the us...
Let's take a look at the problem of VScode re...
1. Vue--The first vue-cli program The development...
1. Transaction characteristics (ACID) (1) Atomici...
Table of contents Preface 1. Rendering 2. Code 3....
MySQL 8.0.18 stable version (GA) was officially r...
Problem Description In the framework of Ele.me UI...
1. Download Dependency npm install @antv/data-set...
Table of contents Various ways to merge objects (...
Configure web page compression to save resources ...
In order to avoid repeatedly entering the Docker ...
Solution to forgetting MySQL password: [root@loca...