If your mysql does not start from XAMPP and the Windows event viewer you see the following error: "mysqld: Index for table '. \mysql\db' is corrupt; try to repair it " we have found a way to repair it.
It's very simple.
mysql has a backup folder where it stores a copy of the tables.
The backup folder can be found, if you have Windows, in the following path: "c:\xampp\mysql\backup" i>
Make backup copy of the original db table (usually 3 files), which is inside "c:\xampp\mysql\data" (or change the name) and copy there the db table (the 3 files) found inside the backup folder.
Doing this solves this problem.
Try to start mysql to check.
Finally, if you wish, you can (once mysql is started) return the corrupted files with the original name and those that we have rescued from the backup folder remove them.
Then use, for example, the phpmyadmin to repair the table. (Menu operations , once the table db is chosen)
It has worked for us.