ques-Tr20X2PO

Search A2Z 24

Question : How to Import / Export a mysql database using the command line?

Import / Export a mysql database on the command line

asked June 11, 2016

1 Answers

Dispalying 1 to 1 of 1 |

To export a mysql database (as a dump) from the command line run:

mysql> database_name > database_exportname.sql

To import a mysql database dump into a database:

mysql>  database_name < database_exportname.sql

To export all databases into a dump:

mysql>  --all-databases > all_databases_export.sql

To import one of these mysql databases from the dump into a database:

mysql>  --one-database database_name < all_databases_export.sql
See comments (0) | Comment
Answered 7 Months ago
Dispalying 1 to 1 of 1 |

Write your Answer write code <pre class="brush: xml">---code---</pre>

Login as a member to access answering block !! click-here
loading...

Reveal Modal Goodness

This is a default modal in all its glory, but any of the styles here can easily be changed in the CSS.

This is just a simple modal with the default styles, but any type of content can live in here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quis sem vel enim eleifend tristique. Etiam tincidunt faucibus pharetra.

×