When connecting MySQL data remotely using the Navicat for MySQL client software, the connection appears 2003-can ' t connect to the MySQL on ' 192.168.1.2 ' (10061) error, because MySQL does not allow remote connections.
Here's how to modify it:
1: Locate the My.ini file under the server MySQL folder. Modify bind-address=127.0.0.1 to bind-address=0.0.0.0 (this item was not found in MySQL 5 my.ini)
2: Restart the MySQL service.
Test the connection condition:
"1045-access denied for user [email protected] (using Password:no)" will appear if the remote login user is not added to the permissions that all machines can access, which indicates the need to add permissions;
Add the following command:
1) Grant all on * * to username @ "%" identified by "password";
2) flush privileges;
By completing the above steps, you can access the MySQL database remotely.
Grant permission 1, permission 2,... Permission n on the database name. Table name to User name @ user address identified by ' connection password ';
Permissions 1, Permissions 2,... Permission n represents 14 permissions, such as Select,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file.
When permissions 1, permissions 2,... Permission n is replaced by all privileges or all to give the user full permission.
When the database name. The table name is replaced by *. *, which indicates that the user is given permission to manipulate all tables on the server.
The user address can be localhost, or it can be an IP address, a machine name, and a domain name. You can also use '% ' to indicate connections from any address.
' Connection password ' cannot be empty, otherwise the creation failed.
For example:
Mysql>grant Select,insert,update,delete,create,drop on Vtdc.employee to [e-mail protected] identified by ' 123′;
Assign the user Joe from 10.163.225.87 the ability to perform operations such as Select,insert,update,delete,create,drop on the employee table VTDC the database, and set the password to 123.
Mysql>grant all privileges in vtdc.* to [e-mail protected] identified by ' 123′;
For users from 10.163.225.87, Joe assigns permissions to all operations on the database VTDC all tables, and sets the password to 123.
Mysql>grant all privileges on * * to [e-mail protected] identified by ' 123′;
For users from 10.163.225.87, Joe assigns permissions to all the tables in all databases and sets the password to 123.
Mysql>grant all privileges on * * to [e-mail protected] identified by ' 123′;
Assign the native user Joe permission to all operations on all tables in all databases, and set the password to 123.
MySQL Add user method
Establish database Gamesp
Create Database Gamesp;
Add user
Grant all on the database name. * To user name @localhost identified by ' password ';
Grant all on gamesp.* to [email protected] identified by ' password ';
Add a remote user named username password of password
GRANT all privileges on * * to [e- Mail protected]"%" identified by ' password '
Description
(1) Grant all grants all permissions
(2) All tables in the gamesp.* database Gamesp
(3) NewUser user name
(4) @localhost the MySQL server server on the local computer
(5) Identfified by ' Password ' Set password
Delete User
Use MySQL
Mysql>delete from user Where user= "xxxxx" and host= "localhost";
Mysql>flush privileges;
Change Password
Mysqladmin-uroot-plk317921web password "111111"