![sql toolbelt copy database sql toolbelt copy database](https://www.mssqltips.com/tipimages2/6156_sql-server-operational-monitoring-redgates-sql-monitor.001.png)
![sql toolbelt copy database sql toolbelt copy database](https://chrisunwinhome.files.wordpress.com/2021/04/maskingset.png)
It would be cool if it were possible to directly import / export between dev and live servers, simply by choosing Connections, rather than saving then reading in dump files.
Sql toolbelt copy database how to#
Instructions on how to do standard Import / Export operations, in MySQL workbench, the docs are SQL Data Export and Import Wizard, and Table Data Export and Import Wizard. I'm not clear specifically the differences between the two tools, or their actual use cases.
Sql toolbelt copy database update#
Under the same menu, there is Database -> Schema Transfer Wizard, which I understood to be used when you need to update to a new server version. This tool is actually designed for more complex migrations between differing kinds of databases (eg PostgressSQL and MySQL) rather than as a general tool for, say, retrieving a copy of your live database down to your local dev server or vice versa. I'm not sure it's any faster using this tool than exporting and importing the databases in the usual manner. Since I use this for my local dev, I only have myself to add anyway. You can do this from the command line if nothing else. There is probably an automated way to clone the users table over as well, but I don't know about it. When it's done, you'll still need to add users (manually?) for the cloned database.
![sql toolbelt copy database sql toolbelt copy database](https://i.ytimg.com/vi/Uz0sH3jL2TM/mqdefault.jpg)
Also you have the option of viewing potential issues and warnings it notes during the process. There are many points where you can make changes before proceeding. Keep clicking next while it goes through the process of reverse engineering your schema from the old to the new servers, until it finally copies the data over. Otherwise, unless you have specific needs, probably select all the other tables, if you are, say, cloning the server (and perhaps its related website).įrom there you'll let MySQL Workbench do its thing. When it asks you to select which databases, it's my understanding that INFORMATION_SCHEMA is read only, and should not be selected. Generally you can select MySQL for either MySQL or MariaDB databases, as MariaDB is generally designed to be a "binary drop-in replacement" to MySQL. You'll also choose the database type, or select their generic version (don't remember what it's called) and let it figure out what kind of database servers you have. Go to Database -> Migration Wizard.įrom there you can select the source and destination connections if you've previously saved them to your Connections list, or you can create a new connection on the fly (be sure to check the box add it to your Connections list). To directly copy a database from one server to another (even a local one) without creating intermediary export/dump files, you can do so within MySQL Workbench using its Migration Wizard.