Copying Databases through the Command Line
Last modified: March 28, 2025
You can automate database copying using the command line.
Note
The command-line interface is available only in certain editions of dbForge Studio. For detailed information on the features availability in the dbForge Studio editions, please refer to the Editions topic.
-
Click Start, type cmd in the Search programs and files text box, and press ENTER. The Command Prompt opens.
-
Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:
dbforgemysql.com /copydatabase [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]
-
Press ENTER to run the process.
Select corresponding command line switches to perform the required operations:
Argument | Action and Usage |
---|---|
/data |
This switch is used to copy data along with schema. |
/recreate |
This switch is used to recreate a target database if it exists on Target. |
/source |
This switch is used to set the source with the following options: * Connect to a live database according to the specified parameters: host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] * Specify a full connection string with additional parameters: connection:<connection_string> |
/sourcedatabase |
This switch is used to define a database to copy. Overrides the database stated in the source option. |
/target |
This switch is used to specify Target with the following options: * Connect to a live database according to the specified parameters: host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] * Specify a full connection string with additional parameters: connection:<connection_string> |
/targetdatabase |
This switch is used to detemine a target database. |
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.