Mysql allow client to connect

Chage my.conf

shell > find / -name my.conf
shell > vi {{PATH_TO_my.conf}}

# comment it 

# bind-address  =127.0.0.1 

shell > mysql -uroot -p
mysql cli > use mysql;
mysql cli > select user,host from user;
mysql cli > update user set host='%' where user='root';
mysql cli > select user,host from user;
mysql cli > flush privileges;

Create New User

# create beauty user
mysql > CREATE USER 'beauty'@'%' IDENTIFIED BY '111111'

# allow all ip can connect
mysql > GRANT ALL ON beauty.* TO 'beauty'@'%';

# let cofig load
mysql > flush privileges;
Last modification:August 26th, 2020 at 05:54 pm
小编很用心去写文章的,大家伙们给点支持呗。