About STUDIO
EMS SQL Management Studio is a complete solution for database administration and development. The STUDIO is an integrated suite of powerful database management tools united in one easy-to-use work environment. Developers will appreciate its ability to create/edit/drop any database objects and will find DB comparison, data export/import and test data generation tools extremely helpful. Database migration, BackUp and Restore tools will be of great help to DBAs. As will be the Scheduler that will automate a sizeable part of DBA's work.
Basically, there are two upgrading options:
1) You should either download the complete Studio package anew and install it on the same workstation as your original version, which will be overwritten. All settings will be saved.
2) Or, you should update SQL Studio components through SQL Studio Direct service (Navigate/SQL Studio Direct main menu item). A pop-up window will tell you about available updates. Click Yes to download these updates (Internet connection is a must). The Refresh icon on SQL Studio Direct toolbar serves the same purpose. You can also set the interval for Automatic polling of the network in search of updates (see the corresponding icon).
The update procedure performed either way will not require any additional registration.
There is a third possibility for updating SQL Manager component only. You can download the Studio edition of the tool from the corresponding SQL Manager download page. You would then need to unpack the archive in the SQL Manager subfolder within SQL Studio installation directory (e.g. C:\Program Files\EMS\SQL Studio for MySQL\SQL Manager).
DB registration and connection
Yes, the STUDIO allows to work with an unlimited number of databases at the same time. You can also operate with any number of databases via SSH and HTTP tunneling. Once the database is registered at the database source repository correctly, you are ready to use it.
Yes, that is possible. It doesn't matter what OS the MySQL Server is under, the STUDIO works only in the Windows environment.
Using our products you can work with MySQL servers located through the named pipes or remotely on any platform (Linux, Unix, Windows, etc.). You can also connect to remote MySQL servers using SSH and HTTP tunneling.
HTTP tunneling is a method that allows one to connect and transmit data between the program and a MySQL server through the HTTP/HTTPS protocols using the 80 port, which is used by a regular internet browser. This method is used to connect to the remote MySQL server of a hosting company when the direct connection is not available because of the security reasons. The HTTP tunnel works the following way: All outgoing queries and commands sent by the client's software are encoded and transmitted through the HTTP\HTTPS protocol using the 80 port to the special script that decodes the received data and sends is to processing MySQL server and sends the result back. This method requires the HTTP server (Apache) and PHP with MySQL to be installed on the remote server. Normally this software is provided by a hosting company that offers the Linux hosting solutions. Also you need to upload the special emsproxy.php script to your web-server to access it remotely (you can place it to the folder with your other PHP scripts). If your web-server complies with the requirements and the script is installed correctly, you'll see the message "EmsProxy v 1.31" (version number can be different) in your browser when opening the http://<yourwebservername>/emsproxy.php page. To register a remote database that will be accessed through the HTTP tunnel you have to enter the following parameters in the Database Registration Wizard of SQL Manager for MySQL:
The First step of the Wizard:
Host is a host where MySQL server is located in point of view HTTP server. Usually HTTP and MySQL server are on the same machine, and it is 'localhost'.
Port is a port of MySQL server on Remote Host, by default it is 3306.
User Name is a MySQL user name.
Password is password of the MySQL user.
Check "Use tunneling" and "HTTP tunneling".
The Second step of the Wizard:
URL is a address of emsproxy.php script (e.g. http://mywebserver /emsproxy.php).
On the first step:
Host is a host where MySQL server is located in point of view SSH server. If SSH and MySQL server are on the same machine, it is equal to SSH Host, or may be 'localhost'.
Port is a port of MySQL server on Remote Host, by default it is 3306.
User Name is a MySQL user name.
Password is password of the MySQL user.
Please, note that MySQL host name should be set relatively to the SSH server in this case. For example, if both of MySQL and SSH servers are located on the same computer, you should specify localhost as Host name instead of server's external host name or IP address.
Please, do not forget to choose Use tunneling and SSH tunneling
On the second step:
SSH host name is a host where SSH server is activated.
SSH port is a port where SSH server is activated.
SSH user name is a user on Linux machine. (It is a Linux user. It is not a user of MySQL server.)
SSH password is a Linux user password.
(more info at: https://dev.mysql.com/doc/refman/8.0/en/can-not-connect-to-server.html)
There could be several possible reasons that prevent you from successful connection to remote database. If the error message says "Can't connect to MySQL server on ‘some host' (10061)" then probably you should check the correctness of port and host name you've entered and also if the remote server is run. It often happens that the port through which the connection is set with MySQL server (normally, it's 3306) is closed for the security reasons by local firewall, corporate firewall or remote server firewall. The remote server port can also be closed by ISP, or TCP/IP protocol support is disabled on MySQL server. Please check this with your system administrator or ISP. In order to avoid this limitation you can use SSH and HTTP tunnels (50, 55).
If the error message says “Access denied for user: root@somehost.somedomain” or "Host not allowed to connect to server", then the reason is that the user doesn't have permission to access the database.
To setup SSH connection correctly, input the following values to the corresponding fields:
On SSH page/tab:
SSH host name is a host where SSH server is activated.
SSH port is a port where SSH server is activated.
SSH user name is a user on Linux machine. (It is a Linux user. It is not a user of MySQL server.)
SSH password is a Linux user password.
On Connection properties/General page/tab:
Host is a host where MySQL server is located from the point of view of SSH server. If SSH and MySQL server are on the same machine, it is equal to SSH Host, or may be 'localhost'.
Port is a port of MySQL server on Remote Host, by default it is 3306.
User Name is a MySQL user name.
Password is a password of the MySQL user.
Please note that MySQL host name should be set relatively to the SSH server in this case. For example, if both MySQL and SSH servers are located on the same computer, you should specify localhost as Host name instead of server's external host name or IP address.
To solve this problem you should grant the necessary permissions to user myuser@ myhost.mydomain. You can do this with the help of phpMyAdmin or with sql commands:
/*!50003 CREATE USER ‘myuser’@ ‘myhost.mydomain’*/;
GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@ ‘myhost.mydomain’ IDENTIFIED BY 'user_password';
Or, you can apply to your system administrator.
(https://dev.mysql.com/doc/refman/8.0/en/error-access-denied.html)
/*!50003 CREATE USER 'user'@'user_host'*/;
GRANT ALL PRIVILEGES ON *.* TO 'user'@'user_host' IDENTIFIED BY ' user_password ';
(https://dev.mysql.com/doc/refman/8.0/en/error-access-denied.html)
You receive this error message because the program can not find the libmysql.dll client library that is essential to work with MySQL server. The libmysql.dll file is included in the Studio installation package. You might have deleted this file accidentally or moved the exe file to another folder. In order to solve the problem you need to reinstall the Studio (all your settings will be saved) or copy the libmysql.dll file from the installation folder to the folder with the exe file.
Object manipulation
You can work with any objects in MySQL databases such as tables, fields, indices, views, stored procedures and functions, triggers, UDFs and events.
Please select the option "Select all records from a table" on the Grid tab of Options/Environment Options dialog. Please, be aware that selecting all records from the table may require considerable time.
For your convenience and to speed up your work Data Grid allows to customise many data display parameters. Here are the most important of them (accessible through "Options/Environment Options"):
At the Grid page:
- Limit options in table and view editors. The “Select all records of a table” option will enable you to see all table records without extra references to the server, yet in case of large tables or low speed connection channel the data may be fetched with huge delays and the incoming traffic might grow considerably. This mode is recommended when working with local databases or in a private network. The “Select only” mode restricts the maximum number of records returned after the query. Man can't process a massive amount of information at once. Hence, we came up with this mode. To request and display the next portion of data use the Next button in the Data Grid toolbar. This mode speeds up table data viewing considerably, prevents hanging and connection timeout. It is recommended to work with large tables, in case of low speed connection channels and when the traffic volume is of importance. This is a default mode. With this mode on the “Use SQL sorting” and “Use SQL filter” options come really helpful.
At the "Grid/Data Options" tab:
- Default Grid Mode. This option defines whether the requested rows will be loaded in the Grid all at once ("Load all rows"), or in parts ("Load visible rows") as the user scrolls down table data. The first mode increases the query opening time but speeds up scrolling. In the second mode the query opens very fast but there might be delays when navigating the grid.
- Use SQL sorting in data view. With this option enabled, when the user sets data sorting a new request is sent to the server, and the result is shown anew in the Grid. This option is very helpful with the “Select only” mode enabled, but it increases the traffic. When this option is disabled, the sorting is made on the client computer without any references to the server but only loaded data are sorted. That is, if you set "Select only 1000 records", then only these records will be sorted.
- Use SQL filer in data view. With this option enabled, the data will be sorted on the server to which a new request is sent, and the result will be shown anew in the Grid.
This option is also helpful when the “Select only” mode is on, but it insreases the traffic. When this option is disabled, the sorting is made on the client computer without any references to the server but only loaded data are sorted. That is, if you set "Select only 1000 records", then only these records will be sorted.
We recommend to set the following option values to achieve maximum efficiency when working with large tables:
- Select only – On
- Load visible rows – On
- Use SQL sorting – On
- Use SQL filter – On
That means a foreign key definition would be formed incorrectly for the altered table. For instance, referenced column doesn’t appear as the first column in some index, both in parent and child tables, or the types of corresponding fields in parent and child tables do not coincide.
You can use SHOW ENGINE INNODB STATUS to display a detailed explanation of the most recent InnoDB foreign key error in the server.
Data is often displayed in such way, if the actual data encoding does not match the encoding of the database fields. For example, Greek characters are stored in the Latin1 encoded field. If so, set the 'Windows charset' value in the 'Client charset' field of the 'Database Registration Info' dialogue. If in this case data is displayed correctly, this mode can be used as a temporary solution. However, you should remember that this is the incorrect database configuration, therefore the server-side comparisons and data sorting will work incorrectly. We recommend you to contact our technical support team in this case.
The ‘DDL‘ tabs of the Table Editor and UDF Editor are read-only. They display the SQL text of the operations you carry over the table on the tabs ‘Fields‘, ‘Indices‘, etc, or over the UDF. To modify this text you can copy it to the clipboard and modify it using SQL Script Editor.
Query
Yes, the STUDIO has a powerful visual query builder that allows a newbie build a complex queries while drasticly save time for advanced users. All you need to do is to specify the tables that will be used in the query, their relations and the data you want to get. The visual query builder will create a text of the query for you. You will only need to run it. You can see the result of your query and make corrections if nesessary. The changes can be made from the visual builder or from the text editor. As changes made in visual query builder, the text editor will display them too and vice versa. Yes, the STUDIO has a powerful visual query builder that allows a newbie build a complex queries while drasticly save time for advanced users. All you need to do is to specify the tables that will be used in the query, their relations and the data you want to get. The visual query builder will create a text of the query for you. You will only need to run it. You can see the result of your query and make corrections if nesessary. The changes can be made from the visual builder or from the text editor. As changes made in visual query builder, the text editor will display them too and vice versa.
1. ALL executed queries are automatically saved in the History. You can view the History and execute or edit any query you need.
2. You can add the frequently used queries to the list of favorite queries.
3. You can save any query as an SQL-script into file on your hard drive and load it when needed or execute it with a command line SQL script tool.
4. You can save your query with the chart. In this case after the query is loaded into STUDIO, the chart will be displayed the way it has been created.
5. the STUDIO allows to save the query chart as a bitmap image.
Yes, sure. The STUDIO has a powerful tool for exporting your data (including the query results). STUDIO can export info MS Access, MS Word, CVS, XLS, HTML, RTF, DBF, XML and others. To ease the exporting procedure the STUDIO has the Export Data Wizard.
Report Designer
Data manipulation
1. Export/Import data from/to several tables at once.
2. Export/import data from/to tables selected from different databases on one host.
3. Command line utility to automatically export/import data using the STUDIO scheduler.
4. A single registered database repository.
You can use Import Data Wizard for this purpose. It will help you to set all the necessary import parameters. Moreover, you can save these settings as a template and use them in the future. Besides CSV file you can also import from MS Excel, MS Access, DBF, XML and TXT files.
Right click on the database you need in DB Explorer and click on "Database Registration Info..." item in popup menu (you can also find this item in main menu "Database"). The Database Properties form will be opened.
Click on the Directories tab.
In the "Default Directory for Export Data" section you can choose the default directory for export file.
You can use Data Pump for MySQL tool for this purpose. To launch Data Pump from STUDIO, please, choose Data Manipulation tab and click on Data Pump for MySQL, or choose Start->Programs->EMS->SQL Studio for MySQL->Data Pump for MySQL->Data Pump for MySQL.
We recommend that you use Microsoft Jet 4.0 OLE DB Provider to connect to your MS Access database.
To migrate from ODBC data source you need to use Data Pump for MySQL tool. You can start Data Pump from STUDIO by choosing Data Manipulation tab and then clicking on Data Pump for MySQL. Or go to Start->Programs->EMS->SQL Studio for MySQL->Data Pump for MySQL->Data Pump for MySQL.
When working with the utility you should use OLE DB Provider for ODBC Drivers to connect to your ODBC data source.
Yes, of course. When generating test data, STUDIO takes into consideration all relations and restrictions that already exist in your database.
Data analysis
You should start Data Comparer Wizard and specify the existing working database as a source database. Then specify database of the yesterday's backup as a target database (you should first restore it on any available MySQL server). Now choose data in which tables you would like to compare and follow the other steps of the wizard. Mind, that Data Comparer allows comparing data in tables with non-identical metadata. After the comparison is complete you will see the list of differences between your databases and will be asked if you would like to synchronize data from source to target or from target to source. You can save SQL script that performs synchronization in a separate file and run it later with the help of SQL Script tool (probably using the STUDIO Task Planer).
You can use DB Comparer for MySQL tool to synchronize the structure of your databases.
To launch DB Comparer from STUDIO, please, choose Data Analysis tab and click on DB Comparer for MySQL, or go to Start->Programs->EMS->SQL Studio for MySQL-> DB Comparer for MySQL-> DB Comparer for MySQL.
To synchronize the data, you can use Data Comparer for MySQL tool.
To launch Data Comparer from STUDIO, choose Data Analysis tab and click on Data Comparer for MySQL, or go to Start->Programs->EMS->SQL Studio for MySQL-> Data Comparer for MySQL-> Data Comparer for MySQL.
BackUP/Restore
STUDIO supports several methods of creating database backups.
1) Using Backup Tables Service. This method can be used for creating backups of MyISAM tables. It is characterized by high speed and reliability. When creating a backup in this way, MyISAM tables chosen by a user are blocked (LOCK TABLES SQL command) and then the files, where structure (.frm) and data (.MYD) are physically kept, are copied according to the chosen path (BACKUP TABLES command). The last can be either a local directory on the server or a shared folder in the network. This path is defined from the server side where MySQL is installed. To call Backup Tables Service, please, open Database Management tab in STUDIO and choose Backup Tables. To call this service from SQL Manager for MySQL open Services/Backup Tables. In order to restore tables from backups created by this method, please, use Restore Tables Service that restores MyISAM tables (RESTORE TABLES SQL command) previously saved by Backup Tables Service. Restore Tables Service does not overwrite the existing tables.
2) Using DB Extract for MySQL or Extract Database Wizard of SQL Manager for MySQL. These tools create backups of databases or user-defined objects in a form of SQL script. The generated script can contain SQL Utility statements, Data Definition statements and Insert Data commands. The main advantage of creating backups with DB Extract for MySQL is the possibility of saving database structure and data as a whole as well as partially. The weak point of this method is much time and traffic that are required for creating backups of large databases. To call DB Extract open Data Analysis tab in STUDIO and choose DB Extract for MySQL. In order to call Extract Database Wizard, please, open SQL Manager for MySQL and choose Tools/Extract Database. To restore a database from a script, created in this way, you can just execute this script on MySQL server. You can use SQL Script for MySQL or SQL Script tool in SQL Manager for MySQL.
3) Using Data Export for MySQL or Data Export Wizard. This method can be used for creating backups of data from any table type. It is useful when you want to save only data without the structure. We recommend that you use CSV format to create data backups. To call Data Export utility, please, open Data Manipulation tab in STUDIO and choose Data Export for MySQL. In order to call Data Export Wizard from SQL Manager for MySQL, open your table on Data tab and choose Export Data. To restore data from created in this way file you can use Data Import for MySQL or Data Import Wizard of SQL Manager for MySQL. You can learn about the differences between Data Import for MySQL and Data Import Wizard of SQL Manager for MySQL here
4) Using Save Data Wizard of SQL Manager for MySQL. It is almost the same as method 3. The only difference is that data are saved in the directory on the server or in the shared folder in the local network with the help of SELECT INTO … OUTFILE SQL command. The data are saved in CSV format, but the speed of creating backups and their restoring is much higher then in the case of using Data Export. However, this method does not allow saving files in any client folder. To call Save Data Wizard from SQL Manager for MySQL, please, open your table on Data tab and choose "Save Data to File on Server". You can easily restore data using Load Data Wizard.
For the chosen users of MyISAM tables Backup Tables Service copies the databases where the structure (.frm) and data (.MYD) are physically kept. It does this according to the chosen path that can be either a local directory on the server or a shared folder in the network.
1) You can restore a backup file, created by Backup Tables Service on the server if its version (major and minor part) coinsides with the server version where this backup was done. In other cases some problems may appear due to the differences in MyISAM file formats in different MySQL server versions.
2) You can restore a backup file created by DB Extract for MySQL or with the help of Extract Database Wizard of SQL Manager for MySQL on any server that has the same or higher version than the one where this backup was created.
3) You can restore the data saved with the help of Data Export for MySQL or Save Data Wizard of SQL Manager for MySQL to a table of any MySQL server version.
Template management
Templates in STUDIO are intended for storage of the parameters necessary for running STUDIO tools. With the templates you will be able to repeatedly perform one and the same operation using STUDIO tool without need to enter each time 10-20 wizard parameters. The parameters stored in a template can be easily modified or you can create a new template based on the existing one.
Template is a file that can store necessary parameters in certain format. Template files can be located anywhere in your PC if only you remember their location :) To simplify the task of template storage and search in STUDIO there is function Template Manager. The Manager allows you to register the necessary templates in STUDIO and not to worry anymore about the place where you saved them to. When you create a new template in STUDIO the Template Manager automatically remembers its location on the disk. All the registered templates are grouped by the tools they are intended for and will be at your disposal at any time. To run a tool with the selected template you will just need to double-click the template.
The Template Manager allows you to perform both operations: you can either delete a template from the registered template list only, or delete it also from the computer disk.
To create a template for the Import tool you should run the Import tool (Main Menu/Run/Data Import). Then you will need to fill in all the necessary import parameters using the Next button. A the last wizard step you should indicate where and under what name you would like to save the newly created template using button Tools/Save Template.
Scheduler
Yes. When creating/editing each Task Step you can define which step should go next. Moreover, for each of the three processed events (successful step termination, erroneous step termination, step termination by time-out) you can indicate a separate variant of next Task operations.
To solve such conflicts in every Task Step you can define its time-out. If a Step is being executed longer than it's defined in the time-out, the Step will terminate with the "by time-out" event, and the Task execution goes on according to the algorithm you set.