How do you fix a MySQL “Incorrect key file” error when you can't repair the table?

前端 未结 10 1918
眼角桃花
眼角桃花 2020-12-13 08:53

I\'m trying to run a rather large query that is supposed to run nightly to populate a table. I\'m getting an error saying Incorrect key file for table \'/var/tmp/#sql

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 09:43

    Apply proper charset and collation to database, table and columns/fields.

    I creates database and table structure using sql queries from one server to another. it creates database structure as follows:

    1. database with charset of "utf8", collation of "utf8_general_ci"
    2. tables with charset of "utf8" and collation of "utf8_bin".
    3. table columns / fields have charset "utf8" and collation of "utf8_bin".

    I change collation of table and column to utf8_general_ci, and it resolves the error.

提交回复
热议问题