使用root用户登录数据库,然后执行下面的命令:
grant all privileges on *.* to 'user'@'%' identified by 'password' with grant option;
user是要开通远程登录权限用户,password的密码,例如:
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
本文介绍如何使用root用户登录MySQL数据库并授予指定用户远程访问权限的方法。通过执行特定SQL命令,可以为用户设置全权访问权限,并允许其从任何主机连接到数据库。
使用root用户登录数据库,然后执行下面的命令:
grant all privileges on *.* to 'user'@'%' identified by 'password' with grant option;
user是要开通远程登录权限用户,password的密码,例如:
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
1万+
9万+

被折叠的 条评论
为什么被折叠?