how can I export my mysql database in webmatrix3

932 Views Asked by At

I created database in webmatrix3 using mysql now i would like to generate .sql dump file to create same database in another machine but i could not found any option to do that can someone help me

1

There are 1 best solutions below

0
On

With MySQL you can generate the sql file using mysqldump from the command line:

mysqldump -u username -p database > out.sql

(fill in your username, and database)

You also might want to add the parameter --routines to also export functions and procedures of the database. And to import the data in the database into the same or another machine:

mysql -u username -p -D database < out.sql

Also be sure that the new database has the correct user access. More detailed information can be found in the MySQL reference manual of mysqldump.