Command-line mode on Linux

You can use the native Linux command line to run dbForge Studio for MySQL.

Note

This topic describes the CLI-powered access to the functionality of dbForge Studio installed into a CrossOver bottle. For more information on the command-line functionality of the Studio, refer to the corresponding topics of the documentation.

As an example, let’s see how to backup a database from the command line. To do that, run the following command:

"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioMySQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /backup /connection:"User Id=[yourusername];Host=[host];Character Set=utf8" /database:[database_name] /password:[yourpassword] /outputfile:"C:\users\crossover\My Documents\backup\[file_name].sql" 

In this example:

"/opt/cxoffice/bin/wine"

…is the command that initiates CrossOver.

--bottle "dbForgeStudioMySQL"

…is the parameter that specifies the name of the bottle that contains dbForge Studio for MySQL.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /backup /connection:"User Id=[yourusername];Host=[host];Character Set=utf8" /database:[database_name] /password:[yourpassword] /outputfile:"C:\users\crossover\My Documents\backup\[file_name].sql"

…is the command to run a backup with the specified options.

Note

The path to the executable file will differ depending on how you have installed the Studio - as a standalone tool or as part of the dbForge Edge bundle. Make sure that you have specified a correct path. If you have installed the Studio as part of dbForge Edge, change the path accordingly:

C:\Program Files\Devart\dbForge Edge\dbForge Studio for MySQL>dbforgemysql.com

Worked example

Let us look at a worked example command to backup the MySQL sakila database that resides on the dbfmylast server.

"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioMySQL" --check --wait-children --start "C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /backup /connection:"User Id=yourusername;Host=IP/Server;Character Set=utf8" /database:sakila /password:yourpassword /outputfile: "C:\users\crossover\My Documents\backup\sakila_202206301604.sql "  

The backup process begins.

Backup from CLI

And finishes successfully.

Backup from CLI

Run a batch file

You can run not only individual commands, but also generated batch files (*.bat/*.cmd files), which are to be created as usual Windows batch files.

Let’s look at an example of code for a batch file.

"/opt/cxoffice/bin/wine" --bottle "dbForgeStudioMySQL" --check --wait-children --start "C:\users\crossover\My Documents\backup.bat" 

In this example:

"/opt/cxoffice/bin/wine"

…is the command that initiates CrossOver.

--bottle "dbForgeStudioMySQL"

…is the parameter that specifies the name of the bottle that contains dbForge Studio for MySQL.

--check --wait-children --start

…are the options that configure the launch of the application.

"C:\users\crossover\My Documents\backup.bat"

…is the parameter that specifies the path to the batch file.

Note

You can automate the launch of dbForge Studio from the command line using the standard Linux scheduler.

If you need to install MySQL Server on Linux (Ubuntu, Debian, CentOS, etc.) use our guide.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?