Skip to content

Access denied for user 'testuser'@'172.17.0.1' (using password: YES) #230

Closed
@ChambreNoire

Description

@ChambreNoire

Hello,

I have created a mysql docker container thus :

docker run
--detach
--name=mysql-test
--env="MYSQL_ROOT_PASSWORD=test"
--volume=/Docker/mysql-cleanweb/config/conf.d:/etc/mysql/conf.d
--volume=/Docker/mysql-cleanweb/storage/:/var/lib/mysql
--publish 6604:3306
mysql:latest

I have a java app which, amongst other things, can create both users and schemas via SQL. My app creates a 'testschema' and a 'testuser'@'localhost' and grants 'testuser' all privileges on 'testschema' :

CREATE DATABASE testschema;
GRANT ALL PRIVILEGES ON testschema.* TO 'testuser'@'localhost:6604' IDENTIFIED BY 'testuser'
FLUSH PRIVILEGES;

Unfortunately when my app tries to connect to this schema as 'testuser' it fails. Using testuser / testuser for jdbc://mysql://localhost:6604/testschema I get "Access denied for user 'testuser'@'172.17.0.1' (using password: YES)".

I've googled around about this and tried using 'testuser'@'localhost' and '172.17.0.1:6604' but still no solution in sight.

Your help would be most appreciatated!

Thanks

Anthony

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions