Issue Summary
When starting the local Wordpress on local I can login into the site, change elements in eloementor etc, BUT when I go to the dashboard, I get the following message : “There has been a critical error on this website. Please check your site admin email inbox for instructions.”
So I checked the error.logs and there the issue seems to be PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in… First I thought, that it would be a disk space issue but that did not work, so I would appreciate a bit of help.
Troubleshooting Questions
How to fix “PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in…”?
Replication
System Details
newest local version
macOS Catalina
[16-Jul-2022 09:56:02 UTC] PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Users/felixhermann/Local Sites/bonculina/app/public/wp-includes/wp-db.php on line 1753
[16-Jul-2022 09:56:02 UTC] PHP Stack trace:
[16-Jul-2022 09:56:02 UTC] PHP 1. {main}() /Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar:0
[16-Jul-2022 09:56:02 UTC] PHP 2. include() /Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar:4
[16-Jul-2022 09:56:02 UTC] PHP 3. include() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/php/boot-phar.php:11
[16-Jul-2022 09:56:02 UTC] PHP 4. WP_CLI\bootstrap() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php:27
[16-Jul-2022 09:56:02 UTC] PHP 5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php:78
[16-Jul-2022 09:56:02 UTC] PHP 6. WP_CLI\Runner->start() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:28
[16-Jul-2022 09:56:02 UTC] PHP 7. WP_CLI\Runner->load_wordpress() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1235
[16-Jul-2022 09:56:02 UTC] PHP 8. require() phar:///Applications/Local.app/Contents/Resources/extraResources/bin/wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1317
[16-Jul-2022 09:56:02 UTC] PHP 9. require_wp_db() /Users/felixhermann/Local Sites/bonculina/app/public/wp-settings.php:124
[16-Jul-2022 09:56:02 UTC] PHP 10. wpdb->__construct() /Users/felixhermann/Local Sites/bonculina/app/public/wp-includes/load.php:561
[16-Jul-2022 09:56:02 UTC] PHP 11. wpdb->db_connect() /Users/felixhermann/Local Sites/bonculina/app/public/wp-includes/wp-db.php:724
[16-Jul-2022 09:56:02 UTC] PHP 12. mysqli_real_conne
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.