- 在 mysql 的命令行中创建 utf-8 编码的数据库
- 建立一个非 root 账号并赋予权限
# database for blog project
## database name: testdjango
## user: tester
## password: tester
CREATE USER 'tester'@'localhost' IDENTIFIED BY 'tester';
DROP DATABASE IF EXISTS `mxonline`;
CREATE DATABASE `mxonline` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
USE `mxonline`;
GRANT ALL PRIVILEGES ON mxonline.* TO 'tester'@'localhost' IDENTIFIED BY 'tester' WITH GRANT OPTION ;
FLUSH PRIVILEGES ;
SHOW DATABASES ;
SHOW TABLES ;