Data Management

Analyze MySQL databases with SQLyog

MySQL Server enthusiasts can now take advantage of an interface similar to SQL Server's Query Analyzer. SQLyog provides the functionality for free.

I've started to build a GUI for MySQL several times, but I got busy with more productive things. My little brother set up for the same reason but then got busy feeding and clothing his family. Consequently, I was happy to discover a product like SQLyog, a Windows application for graphically managing MySQL databases.

First take
SQLyog seemed simple to download, install, and use. I went to the Web site for the download, which is only 384 KB. It installed a couple of files (an .exe and a .dll) into the C:\Program Files\SQLyog directory. I launched the executable.

It’s worth noting that on subsequent visits to the Web site, I got a message that the domain was not configured or registered, or just plain under construction. I don't know if this is only an intermittent problem. The program is free, and there were no banner ads, so it may be that this particular business model won't work out in the long run. Somebody's going to have to foot the bill.

Grok the yog
What is yog? If you're a Heinlein fan (re: “Stranger in a Strange Land”), then you're familiar with the fictional term "grok," which loosely translated mean a complete, nearly empathetic level of understanding. In the real world, geeks are seizing power in India and Pakistan. "Yog" is a Hindi term that roughly translates to "grok.” So, for non-Heinleinian Americans, you're only about 600 pages away from grokking the fullness of SQLyog.

Database, table, and column tree
The program started by asking me for my login credentials to the MySQL server. I simply plugged in my server name, user id, and password. All the rest of the settings were correct by default. Later (after I went on to other things, rebooted a few times, and got some sleep), I relaunched the program, and it needed only my password. There's no option to remember the password, which you can interpret as either a bug or a security feature.

Once you are logged in, the interface is remarkable. All the databases on the MySQL server are listed in a treeview control. You have access only to the databases to which your login account has been authorized. If you expand the tree for your database, you'll get a collection of nodes showing the names of your tables. Expand a table node, and you get a collection of nodes showing the field names and another collection of nodes showing the indexes.

That index interface is a real plus. You can CRUD the search indexes and keys. This is an improvement over database front-ends like Microsoft Access, especially if you get geeky about such things. Considering MySQL’s emergent support of primary and foreign key relationships, this part of the program is very mature. In the lower right-hand pane, you’ll find four tabs: Result, Message, Object, and History.

Any flaws?
I was trying to find flaws, and I discovered only one. If you throw the .exe into the Win32 Dependency Walker, you notice that it makes reference to the COMDLG32.dll file, which in turn references AppHelp.dll. My dependency walker didn't have any such file. Try as I might, I couldn't find how it affected the interface at all, so the fact that my dependency walker had a problem doesn’t mean that the user will.

In fact, I would call this a flaw with Microsoft's common dialog library, and not with SQLyog. When SQLyog references the common dialog control, it does not need the control to reference AppHelp. The fact that CommDlg calls AppHelp, when no function in AppHelp is required means that CommDlg is wasting resources by making the call at all.

Too simple?
In the SQLyog FAQ, there’s an attitude that formal documentation for the software is not necessary. Of course, the FAQ itself is a document, but you get the point. SQLyog has a very intuitive interface. The one trick I’d suggest is to print out a copy of the MySQL documentation, which includes special syntax extensions for SQL. I did it, and it filled up only a single half-inch binder.

Final take?
The FAQ also evokes the tired but true principle of Occam's Razor—no complexity beyond what is necessary. I'm sold on this tool because it gives me a single, graphical interface for managing LOTS of databases on one MySQL server. It's lightning fast, and it's microscopically small (it fits on a floppy!).

SQLyog bills itself as a query analyzer, but it’s so much more than that. I'd really like to cover all of the functions and features available, but there are a lot of them. If you use MySQL, I'd suggest downloading the SQLyog from its Web site (for the price of your name and e-mail address), installing it, and viewing your connection.

Editor's Picks