MySQL: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
To backup (dump) a single database:<br />
To backup (dump) a single database:<br />
<code>mysqldump <i>database_name</i> &#62; <i>database_name.sql</i></code>
<code>mysqldump <i>database_name</i> &#62; <i>database_name.sql</i></code>
Backup all databases:<br />
<code>mysqldump --all-databases > all_databases.sql</code>


== Version ==
== Version ==
See: [[Software Versions]] to check the installed version.
See: [[Software Versions]] to check the installed version.

Revision as of 04:34, 17 February 2017

Note: never use kill to kill MySQL. Use service, or systemctl instead.

Backup and Restore

To backup (dump) a single database:
mysqldump database_name > database_name.sql

Backup all databases:
mysqldump --all-databases > all_databases.sql

Version

See: Software Versions to check the installed version.