This text exists mainly so that I paste the URL into the
#mysql
channel in Libera IRC.
The mysqldump
tools allows you to convert a MySQL
database server or individual schemas back to SQL. You are left
with a script that is supposed to be loadable into a target
server and gives you back the full database, including all
objects in it.
You can read that SQL as a script into an empty server to create a new instance, or process it with different tools for different purposes. So in general, a workflow can look like this:
$ mysqldump --options --more-options and parameters > somescript.sql
$ scp somescript.sql somewhere@else.com:
$ ssh somewhere@else.com
...
$ mysql --show-warnings --whatever-options < somescript.sql
Instead of mysql
with an input redirect, you may
also use the command line client and the source
command:
$ mysql …
[Read more]