mysql 添加用户 赋权

mysql添加用户

insert into user(Host,User,Password) values("%","wulian",password("wulian"));


CREATE USER 'wulian'@'localhost' IDENTIFIED BY 'wulian';    # 创建用户

CREATE DATABASE  wulian DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;  # 创建表

grant all privileges on wulian.* to 'wulian'@'%';  # 赋权

source /root/wulian.sql;

  

上一篇:MySQL8.0.19安装教程


下一篇:Mysql中的编码“utf-8”和”utf8mb4″的区别与使用