If MySQL does not have a password, or if the password is set to empty, you can open cmd as an administrator, then enter mysqladmin-u root password 123456 The password for this place is the plaintext password.
If you forget the root password for MySQL, you can reset it in the following ways:
1. Kill the MySQL process in the system by doing the following:
A. Click the Desktop toolbar to open the taskbar manager.
b, from the Task Manager process to find the Mysqld.exe process, right-click to select the end process.
2. Enter the command at the command line mysqld--skip-grant-tables start MySQL and start it without checking permissions;
3. Then open a window, with a blank password to use the root user login to MySQL;
4. Change the password of the root user;
mysql> Update Mysql.user Set Password=password (' New password ') where user= ' root ';
mysql> flush Privileges;
Mysql> quit
5. Restart MySQL to log in with the new password
Set permissions for the remote Access database: Set the permissions that can be accessed by the root user of all hosts, and the password for the database is 123456
GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
If you want to allow user root to connect to the MySQL server from a host with IP 192.168.1.3, and use MyPassword as the password
GRANT all privileges on * * to ' root ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION;
Remote connection to database directive mysql-h remote host name-U root-p
If the connection is unsuccessful, turn off the firewall
MySQL Reset password and remote connection permissions issues