MySQL Setup does not connect after remote login

Source: Internet
Author: User

MySQL Setup does not connect after remote login

Reference: http://www.jb51.net/article/33813.htm

Http://www.jb51.net/article/58096.htm

By default, MySQL only allows log on locally, and if you want to turn on remote connections, you need to modify the/etc/my.cnf file

sudo vim/etc/mysql/my.cnf
Comment This line: bind-address=127.0.0.1

Save exit.
Mysql-u root-p

To grant permissions to users who require remote logins:

The code is as follows: Mysql>use mysql;mysql>Delete from user where user= ';(delete anonymous user)
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' 123 ' with GRANT option; (123 for password)
mysql> flush Privileges;

Exit MySQL (exit)

Then restart the MySQL service (sudo service MySQL restart)

Telnet command:
Mysql-h 125.216.231.188-u root-p (-H followed by the IP address of the host to be logged in)

MySQL Setup does not connect after remote login

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.