MySQL remote connection cannot be enabled

Source: Internet
Author: User

 

1. Change the table.

Use MySQL management tools, such as sqlyog Enterprise

It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need the computer on localhost.Use MySQL management toolsAfter logging on to MySQL, change the "host" entry in the "user" table in the "MySQL" database to "%" from "localhost"

2. Authorization method.

A:If you want the MySQL account myuser to use the password mypassword to connect to the MySQL server from any host, enter:
Grant all privileges on *. *'Myuser' @ '%'Identified by 'mypassword' with grant option;

If the above command has not yet worked, use the following command!

If you want to allow the MySQL account myuser to connect to the MySQL server from the host whose IP address is 192.168.1.3 and use mypassword as the password, enter: Grant all privileges on *. *'Myuser' @ '192. 168.1.3'Identified by 'mypassword' with grant option;

 

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.