mysql 管理

创建数据库

CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci;

创建用户

create user 'user'@'%' identified by '123';

授权用户

grant all privileges on db.* to 'user'@'%';

查看用户

show grants for 'user'@'%';   

修改密码

use mysql; 
update user set password=password('123') where user='root' and host='localhost'; 
flush privileges; 

mysql8密码问题

ALTER USER 'native'@'%' IDENTIFIED WITH mysql_native_password BY 'new_password';

mysql8导出数据权限

grant process on *.* to dumper;

相关文章

此处评论已关闭