mysql添加用户并用Navicat远程连接

1、root账号远程登录

update user set host='%' where user='root';
flush privileges;

2、新建用户,只允许本地访问

create user Effortzjw@'localhost' identified by 'password';

3、新建用户,允许远程访问

create user Effortzjw@'%' identified by 'password';

4、授权用户管理test表的全部权限

grant all privileges on test.* to Effortzjw;

5、授权用户所有权限

GRANT ALL PRIVILEGES ON *.* TO Effortzjw@"%" IDENTIFIED BY "password";

你可能感兴趣的:(MySQL)