MySQLGUI—the MySQL Graphical Client

It's free, easy to install and works like a champ.
  • Manufacturer: TcX DataKonsultAB

  • E-mail: sales@mysql.com

  • URL: http://www.mysql.com/

  • Price: Free (under the GNU GPL)

  • Reviewer: Bill W. Cunningham

It's rare to find a Linux enthusiast these days who hasn't heard of the MySQL relational database server from TcX DataKonsultAB, of 0. It's free, easy to install, works like a champ, and has had excellent treatment by Reuven Lerner in his column, At the Forge (see Linux Journal, August 2000).

Many first-time MySQL users, upon reading the MySQL manual which comes with the source code, have undoubtedly balked at the manual's instructions on creating a new user:

VALUES('localhost'bill'PASSWORD('semperfi'n>
      'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'Y'

The SQL “create user” and “grant...” commands work with MySQL too, but they require typing practically as meticulous as the above. At this point, some of us have lamented the lack of a graphical front end to all this. Something like Oracle's svrmgrm utility would sure be nice.

Happily, there is a graphical client for MySQL, and it's available from the same people who make MySQL. It's called mysqlgui. There are some other graphical interfaces to MySQL, for example, xmysql and xmysqladmin, but MySQLGUI is unique in that it performs both client and administrative operations in a single package.

None of the books currently available on MySQL mention MySQLGUI at all. Even the MySQL.com web site does not give it any attention. I came upon it by chance at the MySQL web site and decided to download it and give it a try.

MySQLGUI is available in three formats: source code, static binary and semi-static binary. I got the static binary, and it has worked fine. Although the accompanying documentation stresses that MySQLGUI is beta software, I haven't managed to crash it yet.

MySQLGUI is the work of Sinisia Milivojevic, of Larnaka, Cyprus. He reports that MySQLGUI actually has a large base of users worldwide. Its status as beta software notwithstanding, MySQLGUI is very stable—almost devoid of known bugs. It is built with the fltk library. TcX are planning a new GUI client within the coming year, one based on the QT or GTK libraries instead. The basic look may change somewhat in the new version, but all functionality will be retained.

Although the documentation on MySQLGUI is a bit spartan, its built-in functionality is rich indeed. You have to get it up and running and experiment with it to appreciate it. It quickly becomes apparent that a great deal of thought and planning went into MySQLGUI's development. Here is a brief synopsis of MySQLGUI's features.

Assuming you have MySQL server installed and running, you need only download the MySQLGUI source or binary and run mysqlgui from an xterm.

The MySQL Client greeting displays, followed by a user password dialog. After entering the user's password (if any), the MySQL Client main dialog takes over. It is the master control panel from which all other tools are launched. It also is where you can connect to the server, select a database, and run interactive queries against one or more tables. Figure 1 shows the main dialog with a user connected, a table selected, a query entered and the query results displayed. Clicking on the column headings in the query results window will sort the results based on that column's values. The first click sorts ascending, a second click sorts descending, and a third click unsorts. Saving the optionally sorted results to a file is a simple click away (see Figure 1). This ad hoc sorting functionality saves many keystrokes when compared to the MySQL command line client. Any SQL command can be executed in the query input field—not just queries. And the commands entered are saved in the lower command history area, where they may be recalled and re-executed later (even in subsequent sessions).

Figure 1. MySQL Client Main Dialog

MySQLGUI really shines when working with users. For this purpose, it has the Grant/Revoke tool. Figure 2 shows us about to create a new user, “annette”. She will have select, insert, update, and delete privileges on the “cigars” database on localhost. This is much easier, faster and more intuitive than either of the command-line procedures above. One thing perhaps not obvious is that we use the Grant/Revoke tool to create a new user. There is no Create User tool. However, doing it this way allows you to create a user and grant her privileges all in one shot. MySQLGUI, like the MySQL server, was designed to be fast, not fancy. Similar tools enable creating/dropping databases, tables and indices.

Figure 2. Creating a New User

Another useful tool is Table 0. Given time, you can accumulate a lot of databases and tables. Tables often have similar names. Figure 3 shows the database and table 0 tool. It allows you to browse all the databases and tables on your computer. This is quite useful, and I tend to keep this window open all the time when working with MySQLGUI.

Figure 3. Table 0 Tool

I have touched on just a few of MySQLGUI's main features here. Suffice to say that it can perform any operation that one can perform with the command-line client. For simply issuing queries and sorting through your data, it may be all you need. And if you're a developer, it can cut down time spent formulating queries and administering your system. MySQLGUI is a first-class piece of work.

Resources

Bill Cunningham (cunninghamb@cherrypt.usmc.mil) is a systems administrator in Charlotte, NC. Recently retired from the US Marine Corps, he is active in the local Linux community and enjoys running, camping, family activities, and of course Linux!

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix