一、连接mysql服务
mysql -u root -p
二、查询用户表
use mysql ;
SELECT User, Host FROM mysql.user;
三、新增用户并授权
Create USER 'dev4rw'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';
GRANT ALL PRIVILEGES ON *.* TO 'dev4rw'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;