MySQL assigns remote permissions to the user grant all privileges on

Source: Internet
Author: User

I configured permissions to access the database in my virtual machine under Windows

Source: http://blog.csdn.net/louisliaoxh/article/details/52767209

Login:

Log in using the command line on this computer and switch to the MySQL library

- - P  use MySQL
(omitted some content, the novice does not imitate)

Change table

To view the corresponding case of user= ' root ' in the user table, change the table information according to the actual needs

SelectHostUser  from User where User='Root'If the above query has information, but host is localhost or other value, you need to update the table information according to the actual requirement .Update User SetHost='%' where User='Root'# If you want any IP address can use the root user to remote login (note that if the above query statement, query out more than one, you need to do some processing, such as adding a condition such aswhere User='Root'  andHost='localhost'Or delete someone else's record to save only one user='Root''s records)

Change permissions

Use grant all privileges to change the user's remote permissions for some libraries

Syntax templates:

Grant  All Privileges  on  to ' User name '@'IP address 'by' password 'with  Grantoptionprivileges;
Library Name: The name of the database to be accessed remotely, all databases use the "*" table name: The name of the table under the database to be accessed remotely, all tables use the "*" user name: The IP address of the user to assign the remote access permission: The IP address of the computer that can be accessed remotely, all addresses using the "%" Password: the password to be used by the user to be assigned to the remote access permission

I set it myself:

Attention:

Note the parameters and skip-networking configuration of the bindaddress in the configuration file

Bindaddress: Set which IP addresses are configured so that the MySQL server responds only to which IP addresses are requested, preferably commenting out the parameter or setting to 127. 0.0 values other than. 1 Skip -Networking: If this parameter is set, it will cause all TCP/IP ports not to be monitored, that is, the local computer, other clients can not connect to the MySQL server with the network, so should comment out the parameter

MySQL assigns remote permissions to the user grant all privileges on

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.