MySQL

From Psygen Wiki
Revision as of 04:37, 17 February 2017 by Admin (talk | contribs)
Jump to navigation Jump to search

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

Backup (Dump)

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

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


Restore

Restore a database:
mysql database_name < database_name.sql

Restore one database from a dump of all the databases: mysql --one-database database_name < all_databases.sql


Version

See: Software Versions to check the installed version.