Complete database administration package MySQL Workbench - gHacks Tech News

Complete database administration package MySQL Workbench

Recently I covered the MySQL GUI tool MySQL Administrator (see the article "Create a database with MySQL Administrator"). However, this tool was just given the official EOL (End of Life) announcement by the MySQL dev team. Although this is sad news for a tool that had recently become my standard for working with databases, this death knoll has lead me to another, even better, tool MySQL Workbench.

MySQL Workbench replaces all of the MySQL GUI tools, adds numerous power-user features, and wraps them up into a tool that any DBA (data base administrator) will be drooling over. This tool is not just about power, it's also about being one of the best cross-platform, visual database design tools around. And even in beta release, the MySQL Workbench shows it might well succeed in that quest.

In this article I will introduce you to this tool. You will see how MySQL Workbench is install as well as how to connect to a server and create a database.

Installation

You will not find the beta version of MySQL Workbench in your repositories. Instead you will have to download the necessary installation package from the Workbench download page. From that page you can select from the following platforms:

  • Windows
  • Fedora
  • Ubuntu
  • Mac OSX

You can also download the source code and install from that method. Download your preferred file and install the package. Be careful. If you are installing on Ubuntu 9.10 you will want to click on the Development Releases tab and download the latest version. I installed version 5.2.11 and had great success on 9.10. The stable release, however, wasn't so successful (it would install but couldn't connect to the necessary mysqlclient libraries).  You might also find that, to install the development release on Ubuntu 9.10, you will have to also install python-paramiko and python-pexpect. Both of these can be found within Synaptic.

Starting the workbench

 

Figure 1

Once installed, you will find the MySQL Workbench located  (at least in GNOME) in the Programming sub-menu of the Applications menu.  When you first start the workbench you will see the very well laid out home screen (see Figure 1). From the first look it is obvious we are dealing with a serious dba tool.

The first thing that you must do is open a connection to your database server. For simplicity's sake I am going to demonstrate connecting to localhost.

Figure 2

To do this click the New Connection link, which will bring up a the DB Connections Manager (see Figure 2). Since this will be a localhost connection, the only thing you should have to edit is your root user password. Remember, this is the MySQL administrator password (not your system admin password). Before you click OK it is best to click the Test Connection button. This way you will know, immediately, if your connection is successful.  When you see that it is successful, click the OK button to make the connection and dismiss the window.

Figure 3

The next step is to double-click on the new connection you just made (listed  in the Open Connection... window in the main window). When you double click the target connection the SQL Editor will open in a new tab (see Figure 3). When this tab opens you will see all of the current databases listed in the tabs in the lower pane. If you click on a database (Schema) you will see all tables included on that database.

To create a new database all you have to do is click on the "+" symble in the upper right corner of the lower left pane. When you click this a new window will open where you have to enter the following information:

  • Name: Give the db a name.
  • Default Collation: What is the default character set used. For example: A Drupal database uses utf8_general_ci.
  • Comments: (Optional) Any comments you want to add to the db.

When you finish entering the information click Apply which will then open yet another window. This next window displays the SQL statement to be executed. You can review that statement and make changes if necessary. If the statement is correct click Apply Changes to create the database.

You might not see the database appear in the lower pane immediately. You might have to close the SQL Editor tab and then re-open the connection to see your new database.

Final thoughts

We've just scratched the surface on a tool that will serve all of your MySQL database needs from now until this tool sees its EOL (which hopefully won't be for a long, long time). The MySQL developers have really scored big with this tool.

Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. areader said on December 29, 2009 at 12:07 am
    Reply

    heh…nice article, as always, but you better look up the definition of “knoll”. Happy new year, and keep the good hacks coming!

  2. James said on December 29, 2009 at 3:10 pm
    Reply

    I went through the phpMyAdmin withdrawals recently and tried a bunch of different tools as a replacement.

    The official tools from MySQL were a large disappointment. The old one (administrator) worked alright but the version of Qt(?) it uses doesn’t integrate cleanly with my Win boxen – layouts and fonts are all messed up. The newer one (workbench) is very, very buggy and slow.

    After evaluating a bunch of tools I selected HeidiSQL (FOSS) which is really just plain awesome. Its fast, its small, and it works very nicely.

  3. Steve said on January 8, 2010 at 7:07 pm
    Reply

    The Workbench took is not yet ready to replace the GUI tools. While I admit that it is much more flexible in concept, it is still highly buggy and unpolished. By the teams own admission it doesn’t yet do migration yet they felt the need to EOL the existing tools that can. How can you EOL something when its replacement can’t carry out some of the key functionality of the old tool? Workbench has a bright future but at the moment I think it is just not a full replacement for the GUI Tools Suite.

  4. Steven McDonald said on January 15, 2011 at 3:28 pm
    Reply

    A year later and it is still desperately unreliable and buggy on OS X. It is not possible to use it at all with confidence and the UI is disgusting.

    MySQL Workbench is a showcase example of poor software engineering.

  5. Harlin said on November 4, 2011 at 6:03 pm
    Reply

    Steve,

    I could not agree more. Looking at the GUI for the Workbench, its design appears to be a good idea. I’ve found on Fedora that I did have to get rid of the GUI tools to have Workbench installed via yum. I am severely disappointed but only due to the bugginess. I’ve tried to make connections to my MySQL servers and do some dumps and restores. Any time I tried to do this, the client crashes. This is unacceptable.

  6. Rodriges Antonio said on April 16, 2013 at 8:42 am
    Reply

    I found some more better then MySQL Workbench tool – Valentina Studio, it works natively on 3 OS: mac win lin, works as with mySQL/mariaDB, so with postgreSQL and SQLite. And yes, it is also FREE http://www.valentina-db.com/en/valentina-studio-overview

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.