Remote connection to MySQL via Navicat

Source: Internet
Author: User
Tags flush

Reference:

http://blog.csdn.net/apple9005/article/details/53033148

Issue one: When connecting to server MySQL via Navicat under the host, Prompt "2003 Can ' t connect to MySQL server on ' xxx.xxx.xxx.xxx ' (10038)"

Cause: Server 3306 remote port is not open

Solve:

1. First check if the port is open, command: Netstat-an|grep 3306

The 127.0.0.1:3306 is displayed, indicating the local

2. Open MySQL config file, command: sudo vim/etc/mysql/mysql.conf.d/mysqld.cnf

Unregister bind-address = 127.0.0.1

3. Restart the database

Execute Netstat-an|grep 3306 again, and the discovery has changed.

Problem two: After solving the problem, using host Natcivat to connect the server MySQL again, there is another error prompt: 1130-host ' XXX.XXX.XXX. XXX ' is not allowed to connect to this MySQL server

Cause: Remote server does not have permission to log on to MySQL

Solve:

1.Ubuntu Login Mysql:mysql-uroot-p

2. Execute the next command

GRANT all privileges on * * to ' Your user name ' @ '% ' identified by ' Your database password ' with GRANT OPTION;

3. Under the implementation
Flush privileges;

This command refreshes the permissions without restarting

The above is only for versions below 5.7.

More than 5.7 will report errors when executed.

    1. Mysql> Grant all privileges on * * to ' XXX ' @ '% ' identified by ' zzzzz ' with GRANT OPTION;
    2. ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.
    3. Mysql> exit

At this point, you need to perform the Refresh permission first:

      1. Flush privileges;

Remote connection to MySQL via Navicat

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.