新建一个用户并授权,再以新用户身份连接即可。

mysql> CREATE USER '用户名'@'%' IDENTIFIED BY '密码';
mysql> GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' WITH GRANT OPTION;
mysql> flush privileges;

preView