千家信息网

mysql创建新用户并授权访问操作该数据库

发表于:2025-11-08 作者:千家信息网编辑
千家信息网最后更新 2025年11月08日,1.mysql -uroot -p2.输入密码:3.update mysql.user set authentication_string=password('123456') where user=
千家信息网最后更新 2025年11月08日mysql创建新用户并授权访问操作该数据库



1.mysql -uroot -p

2.输入密码:

3.update mysql.user set authentication_string=password('123456') where user='oneuser' and Host = '%';

4.grant all privileges on onetable.* to oneuser@'%' identified by '123456';

5.flush privileges;


然后外部连接数据库。


0