Step 3 of remote connection to MySQL

Source: Internet
Author: User

The following article describes how to remotely connect to a MySQL database. We will describe the procedure in three parts, including how to create a new user correctly, the actual steps for modifying the configuration are described as follows.

1. Create a new user

 
 
  1. Grant all on *. * to 'username' identified by "xuys1234 ";

2. modify configurations

Sudo vim/etc/MySQL/my. cnf

Bind-address = 127.0.0.1 to be commented out

3. Restart MySQL

 
 
  1. Sudo/etc/init. d/MySQL restart

To change the password, use the following statement:

 
 
  1. UPDATE user SET password = PASSWORD ("new password") WHERE user = 'name'; flush privileges;

The above content is an introduction to the remote connection to MySQL. I hope you will get some benefits.

 

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.