Create a user
create user zhangsan identified by 'zhangsan';
Authorize
grant all privileges on *.* to zhangsan@'%' identified by 'zhangsan';
flush privileges;
After mysql authorization is successful, the connection is not always on the look
netstat -apn | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
Modify the configuration file, comment out this line, restart
bind-address = 127.0.0.1