MySQL can take more than an hour to start
问题 I have a mysql (Percona) 5.7 instance with over 1Million tables. When I start the database, it can take more than an hour to start. Errorlog doesn't show anything, but when I trace mysqld_safe, I found out that MySQL is getting a stat on every file in the DB. Any idea why this may happen? Also, please no suggestion to fix my schema, this is a blackbox. Thanks 回答1: This turned out to be 2 issues (other than millions of tables)! When MySQL start, and a crash recovery is needed, as of 5.7.17, it