Use the CTRL + R key combination to quickly open the cmd window and enter the cmd command to open the cmd window.
Use the "mysql-uroot-proot" command to connect to the local MySQL service.
Using the "Use MySQL" command, select the database you want to use, modify the basic information of the remote connection, save it in the MySQL database, and use the MySQL database.
Use "grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with Grant OPTION;" The command can change the settings of the remote connection, where the% represents all IPs, and if set to a single IP can be accessed, then this% is replaced with the external IP of that single IP
Use "flush privileges;" command to refresh the permission that you just modified to take effect.
Use "select Host,user from User;" See if the changes were successful.
Setting up a MySQL server remote connection