-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Env: Access denied for user 'username_here'@'X.X.X.X' error running wp-env start. #29752
Comments
What I don't know is how wp-env previously defined the DB username and password values. (cc @noahtallen, @noisysocks). Struggling to find a reference to anything like that. Not sure if the docker container is supposed to work without these specified. If so, it may be an upstream issue. |
Also noting that the feature added in the WordPress image was |
IIRC these were omitted because the |
Tried setting explicitely the environoment variables for user and password to "root" and "" in the docker-compose.yml generated by wp-env and for some reason I didn't manage to make it work |
The |
@youknowriad I've also created a PR that reintroduces the feature of creating the database on container startup: docker-library/wordpress#575. |
Resolved in #29800. This fix will need to be pushed to npm before anyone outside of gutenberg will see it, and I'm not sure when that will happen. See #29800 (review) for possible follow-up tasks. |
Upgrading `wp-env` to latest version fixes issues related to newer WordPress docker images using different credentials. For more information see WordPress/gutenberg#29752
Upgrading `wp-env` to latest version fixes issues related to newer WordPress docker images using different credentials. For more information see WordPress/gutenberg#29752
Description
When trying to start a new environment using
wp-env
, the CLI issues the following error:This issue is not specific to working locally using this repository, but exists wherever
@wordpress/env
is used.Step-by-step reproduction instructions
npm run wp-env destroy
npm run wp-env start
Expect to see the errors. Should you not see the error, make sure your docker images are updated to the latest.
Quick Debugging
username_here
was implemented in the WordPress docker image fairly recently (docker-library/wordpress@8f5bcc1#diff-7f28a0f62019f2d8b061638e8c3aea207404c1499f1c9241db3216fadd8f4530)wp-config.php
in the WordPress container matches the default config in the PR listed above.wp-config.php
includes thegetenv_docker
function that looks for a localenv_FILE
that does not exist in the WordPress container.No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying '/usr/src/wordpress/wp-config-docker.php' (WORDPRESS_DB_NAME)
Environment Info
Relevant NPM packages
WordPress information
trunk@647a41c
The text was updated successfully, but these errors were encountered: