开发者社区 问答 正文

数据库报错问题

帮我看一下数据库哪里有问题,谢谢。
create database askbot DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
grant all privileges on dbname.* to dbuser@localhost identified by 'dbpassword';
Maybe you'll need to go through the file my.cnf (mysql config) and set all encodings to UTF8.
Somewhere you have incompatible character encodings.

展开
收起
落地花开啦 2016-02-06 17:17:08 2221 分享 版权
1 条回答
写回答
取消 提交回答
  • 公益是一辈子的事, I am digoal, just do it. 阿里云数据库团队, 擅长PolarDB, PostgreSQL, DuckDB, ADB等, 长期致力于推动开源数据库技术、生态在中国的发展与开源产业人才培养. 曾荣获阿里巴巴麒麟布道师称号、2018届OSCAR开源尖峰人物.

    从现象来看,在你的配置中使用了与UTF8不兼容的字符集。
    建议修改my.cnf,都改为UTF8。
    然后重启。

    2019-07-17 18:38:34
    赞同 展开评论