MariaDB

Useful commands

docker exec -it mariadb bash
create database DATABASE_NAME;
grant all privileges on DATABASE_NAME.* TO 'USER_NAME' identified by 'PASSWORD';
flush privileges;

CREATE OR REPLACE TABLE table_name (a int);

docker exec mariadb mariadb-dump -uroot -ppassword --all-databases > /mnt/backup/database/mariadb-$(date +%Y-%m-%d).sql

This entry was posted in Computers. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *