Even my colleagues today to a computer database can be accessed 127.0.0.1 I think that if that is run by the ip access. . . However, not. . Here record method
1. Open the command line mysql bin directory of your computer today
mysql -u root -p
enter password
2. Open the mysql database
use mysql
Retrieving user and the host field - mysql> select user, host from user;
The results should be displayed:
If there is no user = root, host =% user, execute the following statement:
mysql> update user set host='%' where user='root';
3. Authorization to root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
Two of my root "username" and "password"
4, permissions to take effect immediately
flush privileges;
2019-12-12 19:46:29