Navicat for MySQL remote connection to MySQL database 10061 and 1045 errors

Source: Internet
Author: User
Tags localhost mysql

When you remotely use the navicat for MYSQL client software to connect to MySQL DATA, 2003-can't connect to MySQL on '100. when 168.1.2 '(10061) error occurs, it is because MySQL does not allow remote connection.

The modification method is as follows:

1: Find the my. ini file in the MySQL folder on the server. Modify bind-address = 127.0.0.1 to bind-address = 0.0.0.0 (this item is not found in my. ini of MySQL 5)

2: restart the MySQL service.

Test connection status:

"1045-Access denied for user root @ it (using password: No)" appears if you do not have the permission to access all machines for remote logon )", this indicates that you need to add permissions;

Add the following command:

1) grant all on *. * To username @ "%" identified by "password ";

2) flush privileges;

After completing the preceding steps, you can remotely access the MySQL database.

 

Grant permission 1, permission 2 ,... Permission n on database name. Table name to user name @ user address identified by 'Connection password ';

Permission 1, permission 2 ,... Permission n indicates 14 permissions, including select, insert, update, delete, create, drop, index, alter, Grant, references, reload, shutdown, process, and file.
When permission 1, permission 2 ,... Permission N is replaced by all privileges or all, indicating that all permissions are granted to the user.
When the database name. Table name is replaced by *. *, it grants the user the permission to operate all the tables in the database on the server.
The user address can be localhost, IP address, machine name, or domain name. You can also use '%' to connect from any address.
The 'Connection password' cannot be blank; otherwise, creation fails.

For example:
Mysql> grant select, insert, update, delete, create, drop on vtdc. employee to joe@10.163.225.87 identified by '123 ′;
Assign the user Joe from 10.163.225.87 the permission to perform select, insert, update, delete, create, drop, and other operations on the database's vtdc employee table, and set the password to 123.

Mysql> grant all privileges on vtdc. * To joe@10.163.225.87 identified by '000000 ′;
Assign the user Joe from 10.163.225.87 the permission to perform all operations on all tables in the database vtdc and set the password to 123.

Mysql> grant all privileges on *. * To joe@10.163.225.87 identified by '000000 ′;
Assign the user Joe from 10.163.225.87 the permission to perform all operations on all tables in all databases and set the password to 123.

Mysql> grant all privileges on *. * to Joe @ localhost identified by '000000 ′;
Grant the local user Joe the permission to perform all operations on all tables in all databases and set the password to 123.

MySQL user adding method

Create Database gamesp

Create Database gamesp;

Add User

Grant all on database name. * To username @ localhost identified by 'Password ';

Grant all on gamesp. * To newuser @ localhost identified by 'Password ';

 

Add a remote user named username and password
Grant all privileges on *. *Username @ "%"Identified by 'Password'

Note:

(1) grant all Permissions

(2) gamesp. * all tables in the database gamesp

(3) newuser User Name

(4) @ localhost MySQL server on the Local Computer

(5) identpolicied by 'Password' to set the password

 

 

Delete a user
Use MySQL
Mysql> Delete from user where user = "XXXXX" and host = "localhost ";
Mysql> flush privileges;

 

Change Password
Mysqladmin-uroot-plk317921web password "111111"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.