Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:
entrypoint: mysqld_safe --skip-grant-tables --user=mysql
The start up the Docker Compose stack:
$> docker-compose up -d
#!/bin/bash | |
sudo apt install neofetch | |
sudo cp motd.sh /etc/profile.d/motd.sh | |
sudo chmod +x /etc/profile.d/motd.sh |
# --- One liner: MySQL Dump with docker --- # | |
$ /usr/bin/docker exec -it `your container name` /usr/bin/mysqldump -u `mysql user` --password=`mysql password` `mysql database` > backup.sql | |
# --- # | |
# --- One liner: MariaDB SQL Dump with docker --- # | |
$ /usr/bin/docker exec `your container name` /usr/bin/mariadb-dump -u `mariadb user` --password=`mariadb password` `mariadb database` > mariadb_backup.sql |