linux上的mysql報Table 'xxx' doesn't exist的錯誤解決方案,mysqlexist

來源:互聯網
上載者:User

linux上的mysql報Table 'xxx' doesn't exist的錯誤解決方案,mysqlexist
linux上的mysql報Table 'xxx' doesn't exist的錯誤解決方案
問題:程式報Table 'xxx' doesn't exist 的錯誤,但是查看資料庫發現該表已經存在且字母也沒有拼錯。
原因:linux 上的mysql 預設是區分大小寫導致的。
解決:改動mysql的設定檔,在my.cnf中的[mysqld]下面(位置不能錯)加上lower_case_table_name=1這句(1表示不區分大小寫,0區分大小寫),儲存重新啟動mysql。
沒有my.cnf檔案,如果是預設安裝執行以下列操作
[root@hqw mysql]# cp /usr/share/mysql/my-huge.cnf  /etc/my.cnf
再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.