I have a large mysql database that has been imported into a Local site. The DB itself is around 2GB, which isn’t an issue, but it’s from a multisite install that has about 190 sites, and the number of tables in the database is massive. We’re only using this DB for a migration/export and not trying to run it as a site, just some WP-CLI commands.
It appears the startup for this database takes longer than the mysqladmin ping allows. Snips from the logs:
{“level”:“error”,“message”:“Database did NOT respond to ping after 15 tries.”,“service”:{},“serviceBinVersion”:{},“stack”:"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqladmin ping
However, a short time after this, mysql starts successfully. I’ve been able to open the site shell and running “mysql” will connect just fine.
{“class”:“Process”,“level”:“warn”,“message”:“2024-08-06T21:20:47.145930Z 0 [System] [MY-010931] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/darwin/bin/mysqld: ready for connections
. Version: ‘8.0.16’ socket: ‘%%site.runData%%/mysql/mysqld.sock’ port: 10034 MySQL Community Server - GPL.”
Is there a way to adjust the timeout for the mysqladmin ping command? If I can allow for a longer startup time, it should resolve this issue. I can eventually get the site to start within the Local dashboard, but it takes several tries to get started. Or some way to start mysql manually from the site shell?