Can’t open and lock privilege tables: Table ./mysql/db is marked as crashed

On a Cpanel Server, MySQL did not start. I checked the error log in /var/lib/mysql folder, and found the following error in MySQL log file /var/log/mysqld.log 2023-03-10T18:13:26.405453Z 0 [ERROR] /usr/sbin/mysqld: Table ‘./mysql/db’ is marked as crashed and should be repaired 2023-03-10T18:13:26.405465Z 0 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘./mysql/db’ is marked … Read more

myisamchk: Argument list too long

When repairing a large database, i got following error [root@server root]# myisamchk –silent –force –fast –update-state \ –key_buffer_size=64M –sort_buffer_size=64M \ –read_buffer_size=1M –write_buffer_size=1M /var/lib/mysql/databasename/*.MYI -bash: /usr/bin/myisamchk: Argument list too long To fix the error, run SOLUTION 1 find /backup/mysql/bizhat_s2 -type f -print0 -name ‘*.MYI’ | xargs -0 myisamchk –force –fast –update-state –key_buffer_size=64M –sort_buffer_size=64M –read_buffer_size=1M –write_buffer_size=1M SOLUTION … Read more