I recently deployed MySQL 5.6 and found that by default MySQL only allows local services. If you want to make some configurations, please record them as follows. 1. Set up MySQL service to allow external network access Modify the mysql configuration file, some are my.ini (windows), some are my.cnf (linux), Add in the configuration file [mysqld] port=3306 bind-address=0.0.0.0 Then restart the MySQL service and execute service mysql restart. 2. Set up MySQL users to support external network access You need to log in to MySQL with root privileges, update the mysql.user table, and set the Host field of the specified user to %. The default is generally 127.0.0.1 or localhost. 1. Log in to the database mysql -u root -p Enter password mysql> use mysql; 2. Query host mysql> select user,host from user; 3. Create a host If there is no "%" host value, execute the following two sentences: mysql> update user set host='%' where user='root'; mysql> flush privileges; 4. Authorized Users (1) Any host connects to the MySQL server as user root and password mypwd mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypwd' WITH GRANT OPTION; mysql> flush privileges; (2) The host with IP address 192.168.133.128 connects to the MySQL server as user myuser and password mypwd mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.133.128' IDENTIFIED BY 'mypwd' WITH GRANT OPTION; mysql> flush privileges; 【Host field description】 % Allow login from any IP address xxxx Allow access from specified IP address The above detailed process of setting up Mysql5.6 to allow external network access is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Installation and deployment of Linux tool Nethogs to monitor network bandwidth by process
>>: How to run sudo command without entering password in Linux
In the previous article, we introduced three comm...
The web pinball game implemented using javeScript...
Table of contents Avoid using the spread operator...
This article shares the specific code of node+soc...
The most common, most commonly used and most gener...
Some tips for deep optimization to improve websit...
1. Still use PHP script to execute. Command line ...
Table of contents 1. Install the required environ...
Table of contents Preface 1. Linux changes the yu...
Table of contents 1. Problem Description 2. Probl...
Recently, I encountered a problem of whether the d...
I recently configured a server using Tencent Clou...
We know that when using HTML on NetEase Blog, we ...
Docker Swarm is a container cluster management se...
Main library execution CREATE DATABASE test CHARA...