Have you created that user in the database?
Docker - MariaDB - Access denied
Hello,
I have a rights issue with MariaDB inside docker.
mariadb:
image: mariadb:10.7
container_name: yggdra-mariadb
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: musiqueYggdra
MYSQL_ROOT_HOST: '%'
MYSQL_HOST: mariadb
MYSQL_DATABASE: myproject
MYSQL_USER: myproject
MYSQL_PASSWORD: mypassword
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- ./mysql:/var/lib/mysql
restart: unless-stopped
When I try to login with phpmyadmin or ever when I try to migrate the database, I get an error : access denied for user myproject.
Several cases are reported in several posts on the web, I have tried all what I can try for some hours, but it doesn't work better.
Can you help me solve this issue please ?
Thanks a lot.
V
All what I had done was correct.
I solved this by removing entirely the local mysql folder and recreated it empty.
And it works fine.
So the problem was probably that the mariadb database was previously initialized with some configuration and due to security, any further modification via new docker containers was not possible.
Please or to participate in this conversation.