![]() This either means that the username and password information in your `wp-config.php` file is incorrect or we can’t contact the database server at `localhost`. For example, on our local machines we use 8889, and … /** MySQL hostname */ĭefine('DB_HOST', '127.0.0.1:8889') WP CLI "Error establishing a database connection" in localhost (MAMP)įor me, the answer was changing the setting for DB_HOST to 127.0.0.1:8889 instead of localhost in wp-config.php, and also checking the box to "Allow network access to MySQL" in the MySQL settings.Getting the port … Error establishing a database connection. In this case, if you have another port, you can change the setting in the wp-config.php file to match the MySQL port you are using. └───────▀▀▀▀ ▀▀───────────────────────────────────────────▀▀ ▀▀─────────┘Įrror Establishing Database Connection great question! While is right regarding the default MySQL port, sometimes it needs to be different because your system is already using said port. | We're building a world-class hosting platform at Kinsta. How to Fix the MAMP “Error Establishing a Database Connection” (In 3 Steps) ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |