mysql server For security reasons, the default user is only allowed to log in through the command line.
First login to the mysql server via localhost
Change the Host field of the root user in the user table of the mysql database of mysql server to "%".
The operation is as follows:
- Enter the cmd command, hit enter
- Enter the command: mysql -h (localhost or 127.0.0.1) -u (username) -p (if there is a password, keep up with Your password)
- Enter the command: use mysql;
- Enter the command: update user set Host='%' where Host='localhost';
- Enter the command: flush privileges; (This command Must be executed, otherwise the configuration will not take effect)
- Enter the command: quit (exit)
(Hint: Note that you need to add a semicolon after the command!)