Two solutions for mysql remote connection failure and two solutions for mysql

Source: Internet
Author: User

Two solutions for mysql remote connection failure and two solutions for mysql

--- Restore content start ---

(This is reprinted by others, because I think it is very useful. Every time I try to solve this problem by referring to the second method. No matter what you don't listen to, let's say thank you! Also, write it down for your convenience)

Mysql provides two remote access methods. For more information, see:

1. Comment out bind-address = 127.0.0.1 in the [mysqld] section of/etc/mysql/my. cnf.
2. log on to mysql using mysql-uroot-p and enable the remote access permission using the following methods:


Method 1: mysql> use mysql;
Mysql> update user set host = '%' where user = 'root ';
Mysql> flush rivileges;


Method 2: mysql> grant all privileges on *. * TO 'myuser' @ '%' identified by 'mypassword' with grant option;

 

Reproduced original address: http://www.jb51.net/article/35267.htm

--- Restore content end ---

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.