DataBase > MySQL

Backing up and restore MYSQL DB under *Unix

(1/1)

admin:
To create a back up file under unix or lunix use:


--- Code: ---mysqldump -u USER -pPASSWORD DATABASE_NAME > DATABASE_NAME.sql
--- End code ---

where USER: the database user name,
PASSWORD: the password for that user,
DATABASE_NAME: the Database name.

If you have the sql file and want to restore your database from, you can use the following:


--- Code: ---mysql -u USER -pPASSWORD DATABASE_NAME < DATABASE_NAME.sql
--- End code ---

Navigation

[0] Message Index

Go to full version