mysql用户添加

一、连接mysql服务

mysql -u root -p

二、查询用户表

use mysql ;

SELECT User, Host FROM mysql.user;

mysql用户添加_第1张图片

 三、新增用户并授权

Create USER 'dev4rw'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';

GRANT ALL PRIVILEGES ON *.*  TO 'dev4rw'@'%'  WITH GRANT OPTION;

FLUSH PRIVILEGES;

你可能感兴趣的:(mysql,数据库)