MySQLGUI—the MySQL Graphical Client
Manufacturer: TcX DataKonsultAB
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:
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).
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.
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.
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.
- October 2014 Issue of Linux Journal: Embedded
- Encrypt Your Dog (Mutt and GPG)
- Practical Tiny Core in the Fire Service
- Tech Tip: Really Simple HTTP Server with Python
- DevOps for Dummies
- Python Scripts as a Replacement for Bash Utility Scripts
- New Products
- New Products
- Open Axiom
- Returning Values from Bash Functions
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal