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

mysql access denied with bind mounts #43

Open
meinradr opened this issue Apr 30, 2023 · 0 comments
Open

mysql access denied with bind mounts #43

meinradr opened this issue Apr 30, 2023 · 0 comments

Comments

@meinradr
Copy link

First of all I must say great project, I hope it keeps getting maintained. However, I have not been able to put it into production because of the following issue:

I setup elkarbackup with bind mounts to folders instead of volume mounts. Except of that, I'm using the exact same docker-compose.yml as in the example. When bringing up the containers with docker compose, the logs show the following issue:

elkarbackup_1  | 16:50:26 CRITICAL  [console] Error thrown while running command "elkarbackup:tick --env=prod". Message: "An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.20.0.3' (using password: YES)" ["exception" => Doctrine\DBAL\Exception\ConnectionException { …},"command" => "elkarbackup:tick --env=prod","message" => "An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.20.0.3' (using password: YES)"] ["user" => null,"user_email" => "","user_id" => "","user_name" => ""]
elkarbackup_1  | 
elkarbackup_1  | In AbstractMySQLDriver.php line 112:
elkarbackup_1  |                                                                                
elkarbackup_1  |   An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for u  
elkarbackup_1  |   ser 'root'@'172.20.0.3' (using password: YES)                                
elkarbackup_1  |                                                                                
elkarbackup_1  | 
elkarbackup_1  | In Exception.php line 18:
elkarbackup_1  |                                                                                
elkarbackup_1  |   SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.20.0.3' (using pa  
elkarbackup_1  |   ssword: YES)                                                                 
elkarbackup_1  |                                                                                
elkarbackup_1  | 
elkarbackup_1  | In PDOConnection.php line 38:
elkarbackup_1  |                                                                                
elkarbackup_1  |   SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.20.0.3' (using pa  
elkarbackup_1  |   ssword: YES)                                                                 
elkarbackup_1  |                                                                                
elkarbackup_1  | 
elkarbackup_1  | elkarbackup:tick [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<time>]
elkarbackup_1  | 

I check the database, the root user can be accessed from everywhere (¨% root¨). If I try to connect from the docker host to the database with the root user and the password, I run into an access denied error as well. I also tried with a mariadb database instead of the mysql, but I'm seeing the exact same issue.
What's the issue? And why does it behave differently with volume mounts and bind mounts.

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

1 participant