應用場景
在使用mysql叢集的過程中,會遇到很多問題,報很多錯誤,常見的幾處錯誤在此列一下。
錯誤展示
錯誤1
錯誤: ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 14000. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs.
在将單點庫資料轉成叢集庫的時候,會報上面的錯誤,那麼需要将出錯的表中較長的字段改為Text類型或者Blob類型,再繼續執行。
錯誤2
錯誤:在轉換磁盤表的過程中,如果轉換前的記憶體表沒有主鍵,那麼不能轉換為磁盤表。
錯誤3
錯誤:2006 - MySQL server has gone away
在sql節點輸入如下指令set global max_allowed_packet=1024*1024*60;
錯誤4
錯誤:在mysql叢集查詢過程中,大小寫敏感。
在sql節點的/etc/my.cnf配置檔案中,加入參數設定:
[mysqld]
Lower_case_table_names=1
錯誤5
錯誤: Connection is read-only. Queries leading to data modification are not allowed
# mysqladmin -u root -p flush-tables