mysql给root开启远程连接


一、连接数据库

mysql -u root -p
// 在下一行输入密码

二、为root用户开启远程连接mysql数据库(注意要带分号)

grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;

三、刷新权限(注意要带分号)

flush privileges;

四、最后查询user中的用户(注意要带分号)

select host,user from user;

完整版

完整版内容

posted @ 2019-05-16 20:23  ah_lydms  阅读(88)  评论(0编辑  收藏  举报