-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Version
6.8.3
What did you expect to happen?
I expected to spin up a MariaDB instance, configure the correct DB_USER, DB_PASSWORD, DB_PORT, DB_HOST, and DB_DATABASE values, point my local Apache instance to the /bedrock/web directory, navigate to the appropriate URL in a browser, and start the WordPress install.
What actually happens?
I configured Apache and confirmed that it functioned as expected. Then I spun up a MariaDB instance and confirmed that I could open it in Beekeeper Studio (a database GUI). Then I noticed .env (copied from .env.example did not show a constant to set the port, so I used the DATABASE_URL value (and commented out the individual constants).
But when I navigated to the site's index page in my browser, the page said only that there was a problem connecting to the database.
Entering the URL into the browser opened it in Beekeeper Studio as expected. Navigating to the WordPress admin page (/wp/wp-admin) revealed the error was mysqli error 2002. This StackOverflow answer notes that connecting via localhost can trigger a different behavior than connecting via 127.0.0.1.
When I changed the host from localhost to 127.0.0.1 and reloaded the page in my browser, the install screen showed as expected.
Steps to reproduce
- Follow the installation guide up to the “Multisite” heading.
- As referenced in the installation guide, point Apache to serve
bedrock/webas the document root. I did so by adding an entry in Apache'shttpd-vhosts.conffile that mapped thebedrock.localhost:80domain to thebedrock/webdirectory, and making surehttpd.confranIncludeon that file. Start (or restart) Apache. - Start DBngin, add a MariaDB 10 service on port 3308, and start the service.
- Connect with Beekeeper Studio (remember the port), using user
rootand no password, add databasewp_bedrock(at top of the right side panel). ALTERthe password of the root user to (for example)mysecurepassword.- Duplicate
.env.exampleas.env. Comment out lines 1–3 and 10–11, and (for my vhost method) add this line below line 7:DATABASE_URL='mysql://root:mysecurepassword@localhost:3308/wp_bedrock'. - Navigate to
https://bedrock.localhostin a browser. On my system WordPress showed an error. - In the
DATABASE_URLconstant, changelocalhostto127.0.0.1. - Navigate to
https://bedrock.localhost. On my system I saw WordPress's install page.
System info
PHP 8.4.12 (built by Homebrew, with Zend OPCache 8.4.12 and Xdebug 3.4.2)
Apache 2.4.65 (Unix)
MariaDB 10.11.6_intel
DBngin 7.9
MacOS 26.0.1
MacBook Pro 2020 (13 in. Intel, 4 Thunderbolt ports)
Log output
Please confirm this isn't a support request.
No (i.e, this is not a support request)