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
Table of contents What is nginx 1. Download the r...
Table of contents 1. Customize the network to rea...
Official website explanation: When a component is...
Table of contents 1 Introduction to user variable...
This article mainly involves solutions to problem...
The reason is that this type of web page originate...
I am happy that some bloggers marked my article. ...
Table of contents Background Description Creating...
You can see that their visual effects are very bea...
There are many tags and elements in the HTML head ...
Table of contents 01 Background 02 Introduction 0...
When connecting to the local database, navicat fo...
What we are simulating now is a master-slave syst...
Table of contents introduce Installation and Usag...
The semantics, writing style, and best practices ...