Use the CMD command line to modify 20540 of a field in the database table to achieve connection and access. Step 1: Find the bin directory where MYSQL software is installed; (1) current directory of cd (2) specify the bin directory for MYSQL installation (3) input-hlocalhost-uroot-p; modify the value of a field in the database table through the CMD command line to achieve connection and access.
Step 1. find the bin directory where the MYSQL software is installed;
(1) cd \ current directory
(2) specify the bin directory for MYSQL installation
(3) enter-h localhost-u root-p. The password is displayed. enter the password you set when installing the MYSQL software.
(4) enter use mysql; select user, host from user; our goal is to replace localhost with %.
(5) Use the update user set host = '%' where host = 'localhost'; statement to update.
(6) it will be OK if it is changed to this format.
Enter the preceding statement to query the result as follows:
In this case, MYSQL can be accessed using any IP address.