Local Environment:
System: Fedora 20 (Linux should be the same)
Mysql: 5.6.
Remote Environment:
System: windows XP (in virtual machine)
Navcate for mysql: 10.0.11
1. Local Configuration
After the local MYSQL environment is fully configured, you only need to authorize it.
First, make sure that your local firewall has opened port 3306 to support external access.
Then, you authorize it in your mysql instance.
What table modification method and authorization method are available on the Internet.
This is what they call authorization:
Go to mysql
mysql>grant all privileges on *.* to zemo@10.0.2.15 identified by '123456';
In front of the zemo@10.0.2.15 is the user name, you can set the general is root, the second part is the remote IP address,
'000000' is undoubtedly the password.
Because I use a local virtual machine as a remote environment, the permission I grant is all.
You can also open some permissions.
mysql>grant select,insert,update,delete on mercy.* to zemo@10.0.2.15 identified by '123456';
This is a common addition, deletion, modification, and query function.
Permission range: all tables in mercy
Of course, common permissions include create, drop, reload, etc,
The younger brother has never been familiar with these permissions,
If no error is reported, You can query the following:
mysql> select host,user from user;
If the data you just set is successfully queried, execute the following statement to refresh:
mysql> flush privileges;
2. Remote Configuration is the same as normal connection. My navicat
You can also use commands to connect (but make sure that at least myslq-client is installed in your Remote Environment)
You can execute the command:
mysql -u zemo -p123456 -h 192.168.2.100 -P 3306 -D mercy