Quantcast
Channel: Linux eGuides » Example
Viewing all articles
Browse latest Browse all 4

mysqldump example

$
0
0

You can use mysqldump to create a simple backup of your database using the following syntax.

mysqldump -u username -ppassword database_name > dump.sql

Replace username with a valid MySQL user ID, password with the valid password for the user (IMPORTANT: no space after -p and the password, else mysqldump will prompt you for password yet will treat the password as database name, so the backup will fail) and database_name with the actual name of the database you want to export. Finally, you can put whatever name you like for the output SQL dump file, here been dump.sql.


Viewing all articles
Browse latest Browse all 4

Trending Articles