`
温柔一刀
  • 浏览: 856911 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

mysql常用命令

阅读更多
创建数据库指定编码
CREATE DATABASE `databasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

设置编码
SET character_set_client = utf8;
SET character_set_connection = utf8;
SET character_set_database = utf8;
SET character_set_results = utf8;
SET character_set_server = utf8;

SET collation_connection = utf8_bin;
SET collation_database = utf8_bin;
SET collation_server = utf8_bin;

修改权限
grant select,insert,update,delete on *.* to root@"%" Identified by "password";

use mysql;
select host,user,password from user;

flush privileges;

导入
mysql>use 数据库名;
mysql>set names 'utf8';
mysql>source data.sql;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics