mysql>use mysql
mysql>update user set host = '%' where user ='root';//允许root(自行修改用户) 远程连接
mysql>flush privileges;
授权root 远程连接 密码为root123
GRANT ALL PRIVILEGES ON TO 'root'@'%' IDENTIFIED BY 'root123' WITH GRANT OPTION;
flush privileges;//刷新授权表
当然你要指定ip 不能让所有的外网都来连
允许root 从内网1100来链接,如果是外网 改成外网ip
GRANT ALL PRIVILEGES ON TO 'root'@'1921681100' IDENTIFIED BY 'root123' WITH GRANT OPTION;
flush privileges;//刷新授权表
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)