-
-
显示全部的数据库:show databases;
-
创建数据库:CREATE DATABASE mysite_db DEFAULT CHARSET=utf8 DEFAULT COLLATE=utf8_unicode_ci;
-
创建用户:create user 'gyf'@'localhost' identified by '密码';
-
给相关用户权限到相应的数据库:grant all privileges on mysite_db.* to 'gyf'@'localhost';
-
刷新:flush privileges;