1、创建数据库 create database db_name default character set utf8; 2、创建用户并且赋予权限 GRANT ALL PRIVILEGES ON db_name.* TO db_user @localhost IDENTIFIED BY 'password' WITH GRANT OPTION;