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;