MySQL: Incorrect key file error AND InnoDB: Error: unable to create temporary file; errno: 2
When I encounter the incorrect key file for table error, it’s almost certainly because the disk is full and MySQL can’t write to the tmpdir. The solution is simple, just move tmpdir to another partition with enough disk space. Open my.ini and change tmpdir to another directory with enough disk space. Restart MySQL and that …