MySQL Remote connection permission opening statement

Source: Internet
Author: User

MySQL Remote connection permissions open to execute the following statement:

#视自己情况修改, user name and password

The code is as follows Copy Code

GRANT all on *.* to root@ "%" identified by "your own password";
Flush privileges;
Exit

Reminder, if the remote function is turned on the server security may be unsafe, so we should pay attention to small oh, of course, we can specify that IP can be remotely connected

The code is as follows Copy Code

Grant all privileges in *.* to ' root ' @ ' 192.168.0.1 ' identified by ' Root-password ';
Flush privileges;
Exit

192.168.0.1 is the client IP that connects the MySQL server

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.