yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
242 stars 72 forks source link

No permissions for anyone@localhost #3

Closed frebib closed 7 years ago

frebib commented 7 years ago
frebib@Ares /e/s/s/cacti> dsh cacti-db                                                                                     master!?
/ # echo 'SELECT 1+1;' | mysql -u root -p${MYSQL_ROOT_PASSWORD}
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
/ # echo $MYSQL_ROOT_PASSWORD
iND2vpSZsNeirlFgTonDzEbNcFaOzV3s
/ # echo 'SELECT 1+1;' | mysql -u $MYSQL_USER -p${MYSQL_PASSWORD}
ERROR 1045 (28000): Access denied for user 'cacti'@'localhost' (using password: YES)
/ # echo 'SELECT 1+1;' | mysql -D $MYSQL_DATABASE -u $MYSQL_USER -p${MYSQL_PASSWORD}
ERROR 1045 (28000): Access denied for user 'cacti'@'localhost' (using password: YES)

I'm slightly confused by this because the init script adds permissions for both root and the other user. Any ideas as to why?

I'm starting the container with no volumes so the database gets initialised each time and using almost the same docker-compose config provided in the README

frebib commented 7 years ago

Nevermind, I see that root@localhost has no password