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