myisamchk Error 22 on Windows

If you want to repair tables in a MySQL database, the docs say that you can just run myisamchk –silent –force */*.MYI. That doesn’t work under all version of MySQL for Windows, though, so you may get an error saying, “Error: 22 when opening MyISAM-table ‘*.MYI’. ” If you do, you can run this command instead: FOR %G IN (dir \b c:\mysql\data\mydb\*.myi) DO myisamchk -r -f %G

Leave a Reply

Your email address will not be published. Required fields are marked *