MySQL8 installation and use among some caveats

Foreword

        This new project to build two days, in mysql8 installed locally (local environment windows), during forgot your password, uninstall and reinstall a lot, then fiddle with a meal to someone authorized to access the last stumbling doing a good job, here is Summary of problems and solutions encountered in this process, if wrong, please correct me.

text

mysql8 installation with other version is no different, modify the password command with common grant is being given, can be used alter instruction:

        alter user 'root'@'localhost' identified by '123456';

        Explanation: The first quotes put the user name, the second put the host, the third one is the password after revision. After performing without performing flush privileges, you can take effect.

        Note: For root or other new user created, try to host% have changed, so you can access your database in another computer.

To unload heavy equipment, the steps may be performed as follows:

 

 

 

 

 

 

         4, enter C: \ ProgramData folder will delete mysql

 

        5, lower left corner of the input box, enter regedit into the registry, delete the following:

HKEY_LOCAL_MACHIN->SYSTEM-> ControlSet001->Services->MySQL;

HKEY_LOCAL_MACHIN->SYSTEM-> ControlSet002->Services->MySQL;

HKEY_LOCAL_MACHIN->SYSTEM-> CurrentControlSet->Services->MySQL;

        6, finally enter cmd administrator privileges in sc query mysql mysql check whether there are services available to perform  sc delete mysql command to delete

       After doing the above steps, then I believe you will be able to re-execute mysqld install properly installed. The sixth step above with reference to Bowen [ https://blog.csdn.net/qq_39701269/article/details/77935490 ] thank bloggers share the experience.

 To a new user authorization command:

        grant all privileges on my_project.* to 'localuser'@'%';

        Interpretation: (. * That is the meaning behind all privileges) which my_project is the database name, user name is localuser,% is host, grant all permissions my_project libraries to localuser the user, the last percent sign refers to all ip can access the database, of course, provided that the network can ping.

Finally, talk about how to get access to other computers I started a local database:

First, to create a good character, good character granted the right, host to modify%;

Second, check other people's computers can not ping your ip, If the ping is directly connected to navicat other tools, database address is your computer's ip;

The last ping for different situations, you can check the firewall, I started today is the first reference of Baidu experience, modified in the control panel the following places:

 

        Add a text box to access the computer's ip to your database. 

        Also check both the [Advanced] in the following

 

        But I after such operations, and found another computer or Rom in my database, and finally turn off the firewall find even enough. It seems firewall is different ping culprit.

This time on here, we will again next issue!

 

 

Guess you like

Origin www.cnblogs.com/zzq6032010/p/11669019.html