17 de octubre de 2021

How to Backup and Restore MariaDB/MySQL databses


This is a clear tutorial about:

https://phoenixnap.com/kb/how-to-backup-restore-a-mysql-database




En resumen:

Backup:

sudo mysqldump -u [user] -p [database_name] > [filename].sql

 

Restore:

mysql -u root -e "CREATE DATABASE database_name"

mysql -u [user] -p [database_name] < [filename].sql

No hay comentarios:

Publicar un comentario