MySQL字元集問題

來源:互聯網
上載者:User

最近有個小項目需要修改MySQL的字元集,所以按照網上的教程修改,發現MySQL不能啟動

然後網上說是,/etc/my.cnf設定的問題,貌似項目中MySQL是用rpm安裝的,在etc中沒有my.cnf,所以按照晚上的教程自己寫了一個my.cnf放在etc檔案夾下,啟動失敗。刪除my.cnf,MySQL服務啟動成功。

所以應該是my.cnf的設定問題,開啟/var/lib/mysql/localhost.localdomain.err檔案,查看發現了錯誤,/usr/bin/mysqld: unknown variable 'default-character-set=utf8' 注釋my.cnf中的這條語句,啟動成功,上網尋找,發現網上有大牛說,

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.