cache_form error: myisam_sort_buffer_size is too small After running mysqlcheck -udbuser -p --auto-repair --optimize --databases mydrupaldb, I got the following error.


  cache_form error: myisam_sort_buffer_size is too small 


Someone has suggested that it should be solved by increasing sort_buffer_size parameter, for example with myisamchk -r -q cache_form.MYI --sort_buffer_size=2G. Executing this command causes the following error. 


  myisamchk: error: File 'cache_form.MYI' doesn't exist


How can I fix it?
mysqlcheck is a client utility that actually logs into mysql

myisamchk is a client utility that does not require logging in. It does require


access the raw file(s) needed, provided the datafile is not in use by the mysqld process
your current directory is wherever the datafile is located


For the table mydrupaldb.cache_form, here is what you must do:


Step 01) Run this query : SHOW VARIABLES LIKE 'datadir'; In most instances, this will be /var/lib/mysql. For the sake of this example, let's assume it is /var/lib/mysql.
Step 02) cd /var/lib/mysql/mydrupaldb
Step 03) service mysql stop
Step 04) myisamchk -r -q cache_form.MYI --sort_buffer_size=2G
Step 05) service mysql start


Give it a Try !!!

CAVEAT : The error message probably means you were not standing in the proper directory where cache_form.MYI is located at the time you first ran myisamchk.