You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is lightly touched on (mysqldump is mentioned once), but this is probably pretty important for people i.e. stuck on ZendDBi.
I would put it something like, considering that the way I write tutorials is significantly different (comments in <>):
You first want to dump the old database using mysqldump. This will dump out the database into SQL DDL/DML. You'll probably want to use the database's root account, as that has permission to dump everything in the database.
We'll dump all databases, since that's what you likely want when migrating or backing up. (If you want to only dump specific databases, use --databases foo bar xyzzy .... Other options are more contextually dependent and out of scope for this article.) In addition, it may make sense to use the old mysqldump command too, so we'll explicitly specify it. <XXX: the path to the binary for zenddb/old zend server> Run the following, adjusting as needed for your old MySQL setup <XXX: perhaps ports?>:
Since mysqldump outputs the SQL to standard output, we'll redirect it to a file. Said file also functions as a backup of your database; it might be good to get in the habit of running it on your new database too!
[...]
Once the server is set up, we can restore any old database dump. Since the dump is just SQL, we can easily restore it using the mysql command, which takes in SQL.
We'll run the following, adjusting as needed for your MariaDB setup <XXX: perhaps ports?>:
$ # We'll specify the absolute path to make it obvious that this is new MariaDB
$ /QOpenSys/pkgs/bin/mysql -u root -pPASSWORD < path/to/dump.sql
The contents of your old database should now be available.
The text was updated successfully, but these errors were encountered:
This is lightly touched on (mysqldump is mentioned once), but this is probably pretty important for people i.e. stuck on ZendDBi.
I would put it something like, considering that the way I write tutorials is significantly different (comments in <>):
You first want to dump the old database using
mysqldump
. This will dump out the database into SQL DDL/DML. You'll probably want to use the database'sroot
account, as that has permission to dump everything in the database.We'll dump all databases, since that's what you likely want when migrating or backing up. (If you want to only dump specific databases, use
--databases foo bar xyzzy ...
. Other options are more contextually dependent and out of scope for this article.) In addition, it may make sense to use the oldmysqldump
command too, so we'll explicitly specify it. <XXX: the path to the binary for zenddb/old zend server> Run the following, adjusting as needed for your old MySQL setup <XXX: perhaps ports?>:$ /path/to/bin/mysqldump -u root -pPASSWORD --all-databases > path/to/dump.sql
Since
mysqldump
outputs the SQL to standard output, we'll redirect it to a file. Said file also functions as a backup of your database; it might be good to get in the habit of running it on your new database too![...]
Once the server is set up, we can restore any old database dump. Since the dump is just SQL, we can easily restore it using the
mysql
command, which takes in SQL.We'll run the following, adjusting as needed for your MariaDB setup <XXX: perhaps ports?>:
The contents of your old database should now be available.
The text was updated successfully, but these errors were encountered: