MySQL
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.