MySQL Query Browser Quick Start Guide

Welcome to MySQL Query Browser


The MySQL Query Browser is a graphical shell where you can execute queries and develop SQL scripts, with several features to help you improve your productivity.

This short guide will guide you through the main features available in the MySQL Query Browser and will to show you how to use most of the basic functionality available. For full documentation, please refer to the MySQL Query Browser User Manual.

The MySQL Query Browser interface tries to mimic the interface of a web browser. Therefore, many of the features you normally find in a web browser are also available here, such as Back/Next navigation, query bookmarks and query history.

Executing SQL Queries

Selecting the Default Schema

Before executing queries, you must select the default schema that you will be working on. You can select that by:

All subsequent queries will be executed using that schema by default.

Executing SQL Statements

The main query bar is located at the top of the window and contains navigation buttons and the query entry box. You can execute SQL statements by typing them in that field and pressing the Execute button (or by pressing Control-Enter). The results of SELECT statements are shown in the main area below.


Editing Resultsets

If the query resultset is editable, you can click the Edit button below the resultset view. Double clicking cells in the resultset will allow you to edit their contents. Changes are commited to the database only after the Apply Changes button is pressed.
For a resultset to be editable, the following conditions must be met:


Comparing Resultsets

You can compare two resultsets that contain the same column names with the same datatypes, for example, to compare the differences of a backed up version of a table with its up-to-date counterpart. For that, split the resultset area in 2 (through the right-click popup menu from the resultset area), execute one of the queries selecting the top resulset view and the second query after selecting the bottom resultset view. Once you press the Compare button, the contents of the resultsets will be sorted and compared side-by-side, with different colors.

Query History and Bookmarks

Every query that you execute will be recorded in the History. You can return to previously executed queries by pressing the Back button in the top toolbar, by double clicking the desired entry in the History browser, at the right of the main window or by dragging the query you want and dropping to the query editor area or directly in the resultset view.

To bookmark a query, press Control-D. A dialog will request a name for the query bookmark, which will be listed in the Bookmarks list. To retrieve a bookmark, you can use the same actions as for the History.

Query Composition

The MySQL Query Browser supports some very handy "query composition" features. You can quickly build SQL queries with drag&drop and mouse clicks.

By selecting a table from the database list and dragging it over the query entry box, an action bar with some query composition actions will pop-up. Drop the table you're dragging on the desired action and the query will be modified accordingly. The following actions are possible:

Also, dragging and dropping a table directly to the query box or double-clicking a table in the database list, will compose a new SELECT statment.