mhubig / docker-partkeepr

mhubig/partkeepr docker image repository
63 stars 64 forks source link

Any way to access and backup database? #38

Closed whc2001 closed 3 years ago

whc2001 commented 3 years ago

I wanted to backup the database, however I tried to connect using the credentials PartKeepr used in the main container and got denied:

root@d0cc34f8009d:/var/www/html# mysql -hdatabase -upartkeepr -p
Enter password: partkeepr
ERROR 1045 (28000): Access denied for user 'partkeepr'@'172.24.0.3' (using password: YES)

The docker-compose file enabled MYSQL_RANDOM_ROOT_PASSWORD by default so I don't know the root password. Is there any way to access the database manually? The PartKeepr instance can access the database normally.

whc2001 commented 3 years ago

Nevermind, as https://github.com/docker-library/mariadb/issues/99#issuecomment-281756045 mentioned I can apply the --skip-grant-tables parameter to docker container and use the old trick to reset the root password.