System environment:
3.13. 0--generic #:x86_64 x86 _64 x86_64 Gnu/linux
MySQL has been installed in the system.
The first step , modify the configuration file,/etc/mysql/my.conf
Find bind-address = 127.0.0.1 This line and comment, as follows:
# # Instead of Skip-which more less secure.# bind-address 127.0. 0.1 #
After modifying, restart MySQL to make the configuration effective:
sudo /etc/init.d/mysql start
The second step is to authorize users to connect remotely
Grant All Privileges on *. * to [Email protected] "%byprivileges;
The command line is interpreted as follows:
First line:
*. *: The first * represents the database, the second * represents the data table, *. * represents all the tables in all databases, and users can authorize specific databases according to their own application.
[email protected] "%": root for the root account authorization, "%" in the "%" can specify the user's ip,% means that any IP can be accessed.
"Password": is the account corresponding password, here is the root password
Second line:
Refresh authorization information to make authorization settings effective immediately
Linux settings allow remote connection of MYQL database