CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE 的语法:CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name[create_specification [, create_specification] ...]create_specification:[DEFAULT] CHARACTER SET charset_…
create database sina default character set utf8mb4 collate utf8mb4_unicode_ci; show variables like '%char%' 建库以后,不生效,还需要修改配置文件,重启数据库. 还需要修改my.cnf文件 character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci…
增加一个用户mydb密码为123450, 让他只可以在(localhost/%)%表示可以支持远程上登录,并可以对数据库mydata5_db进行查询.插入.修改.删除的操作. grant select,insert,update,delete on mydata5_db.* to mydb@'%' identified by "123450";…