Wednesday, December 16, 2020

mySQL: How to take a full backup of a database

How to take a full backup of a database? 


/* Will create the CREATE DATABASE statement*/

mysqldump -u [username] -p[password] --databases [database_name] > [dump_file.sql]

OR

/* Will NOT create the CREATE DATABASE statement*/

mysqldump -u [username] –p[password] [database_name] > [dump_file.sql]


From the page


No comments:

Post a Comment