Skip to content
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

Problem with connect to Database "Access denied for user 'root'@'172.20.0.6' (using password: YES)" when trying to connect" #228

Open
tomekkowalczyk opened this issue Jun 3, 2022 · 2 comments

Comments

@tomekkowalczyk
Copy link

Hey, I'm having trouble running the tests on DDEV Mautic. Web works no problem

Adres IP kontenera db to 172.20.0.2

image

xxx@mautic-web:/var/www/html$ bin/phpunit -d memory_limit=1G --bootstrap vendor/autoload.php --configuration app/phpunit.xml.dist --filter EmailApiControllerFunctionalTest::testSingleEmailWorkflow
PHPUnit 9.5.20 #StandWithUkraine

E                                                                   1 / 1 (100%)

Time: 00:39.772, Memory: 54.16 MB

There was 1 error:

1) Mautic\EmailBundle\Tests\Controller\Api\EmailApiControllerFunctionalTest::testSingleEmailWorkflow
Exception: mysqldump --opt -h"${:db_host}" -P"${:db_port}" -u"${:db_user}" "${:db_name}" > "${:db_backup_file}" failed with status code 2 and last line of "mysqldump: Got error: 1045: "Access denied for user 'root'@'172.20.0.6' (using password: YES)" when trying to connect
"

/var/www/html/app/bundles/CoreBundle/Test/MauticMysqlTestCase.php:233
/var/www/html/app/bundles/CoreBundle/Test/MauticMysqlTestCase.php:181
/var/www/html/app/bundles/CoreBundle/Test/MauticMysqlTestCase.php:50
/var/www/html/app/bundles/EmailBundle/Tests/Controller/Api/EmailApiControllerFunctionalTest.php:15
phpvfscomposer:///var/www/html/vendor/phpunit/phpunit/phpunit:97

ERRORS!
Tests: 1, Assertions: 3, Errors: 1.


Adres IP kontenera db to 172.20.0.2

DB_HOST=db
DB_PORT=3306
DB_NAME=test
DB_USER=root
DB_PASSWD=root
MAUTIC_TABLE_PREFIX=
MAUTIC_ENV=test
MAUTIC_ADMIN_USERNAME=admin
MAUTIC_ADMIN_PASSWORD=mautic
@SSAdvisor
Copy link

Almost 2 years open, did you ever get this resolved?

@mollux
Copy link
Contributor

mollux commented Feb 19, 2024

This issue was probably for the mautic/mautic repo, as it's related to testing of the codebase.
Most likely there was confusion that ddev uses docker images, and Mautic also has docker images.
But those Mautic images contain the production version, not a version that can be used during testing.

@SSAdvisor If you're experiencing a similar issue with running tests in DDEV, please reach out via https://forum.mautic.org/ or the Slack channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants