- 3.1 MySQL Query Browser Capabilities
- 3.2 Using MySQL Query Browser
- 3.3 Using the Query Window
- 3.4 The MySQL Table Editor
- 3.5 Connection Management
- 3.6 The Options Dialog
3.2 Using MySQL Query Browser
MySQL Query Browser is not included with MySQL distributions but can be obtained from the MySQL AB Web site. It’s available in precompiled form for Windows and Linux, or it can be compiled from source.
MySQL Query Browser requires a graphical environment such as Windows or the X Window System. On Linux, MySQL Query Browser is designed for Gnome, but can be run under KDE if GTK2 is installed. If a MySQL server is running on a host with no graphical environment, you can connect to it remotely by running MySQL Query Browser on a client host that does have a graphical environment.
On Windows, the installer creates a desktop icon and an entry in the Start Menu, so you can start MySQL Query Browser using either of those. The program itself is located in the installation directory, C:\Program Files\MySQL\MySQL Query Browser 1.1, so you can also start MySQL Query Browser from the command line by invoking it directly after changing location into that directory:
C:\> cd "C:\Program Files\MySQL\MySQL Query Browser 1.1" C:\Program Files\MySQL\MySQL Query Browser 1.1> MySQLQueryBrowser.exe
RPM installations on Linux place MySQL Query Browser in /usr/bin. Assuming that this directory is in your search path, you can invoke the program as follows:
shell> mysql-query-browser
For tar file distributions, MySQL Query Browser is installed wherever you unpacked the distribution, and the program is located in the bin directory under the installation directory. To invoke the program, change location to that bin directory. For example, if you installed the distribution at /opt/mysql-query-browser, start MySQL Query Browser like this:
shell> cd /opt/mysql-query-browser/bin shell> ./mysql-query-browser
On all platforms, after you start MySQL Query Browser, it displays a Connection dialog. To connect to a MySQL server, fill in the required connection parameters in the dialog or select from among any connection profiles that may already have been defined. The Connection dialog is described in Section 3.5, "Connection Management."
After you connect to the MySQL server, MySQL Query Browser displays a window that you can use for issuing queries. (See Figure 3.1.)
Figure 3.1 MySQL Query Browser main window.
To open connections to additional servers, select New Instance Connection ... from the File menu. MySQL Query Browser opens a separate query window for each connection.
As shown in the figure, a query window has several major areas:
- The top part of the window contains an area for entering queries and has several sets of buttons that aid in query construction and execution.
- At the lower left, a result area displays results from queries. There can be multiple results, each accessible as a tab so that you can easily switch from one to another.
- At the right, there are two browser areas. The Object Browser allows you to navigate databases, bookmarked queries, and your query history. The Information Browser provides access to statement syntax and function documentation and to query parameters.
The query window also contains several menus from which you can access additional features. For example, you can access the Script Editor from the File menu.