mysql新增使用者並用Navicat遠端連線
阿新 • • 發佈:2020-12-19
技術標籤:MySQL
1、root賬號遠端登入
update user set host='%' where user='root';
flush privileges;
2、新建使用者,只允許本地訪問
create user [email protected]'localhost' identified by 'password';
3、新建使用者,允許遠端訪問
create user [email protected]'%' identified by 'password';
4、授權使用者管理test表的全部許可權
grant all privileges on test. * to Effortzjw;
5、授權使用者所有許可權
GRANT ALL PRIVILEGES ON *.* TO [email protected]"%" IDENTIFIED BY "password";