在MySQL中创建库和用户

创建数据库

1
CREATE DATABASE `irenshi` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

创建用户

1
CREATE USER 'irenshi'@'%' IDENTIFIED BY 'irenshi';

授权数据库访问

1
GRANT ALL PRIVILEGES ON irenshi.* TO 'irenshi'@'%';


转载请注明出处:在MySQL中创建库和用户
原文地址:https://www.xiaotanzhu.com/%E6%95%B0%E6%8D%AE%E5%BA%93/2016-08-23-create-db-user-in-mysql.html