If you manage a MySQL database server, you may or may not have the skills to do so from the command line. It takes quite a lot of skill and patience to tackle that task from the console. For those who don't have the time to learn the MySQL console or who just prefer a good GUI tool for the task, there are a number of tools available for the management of a MySQL database. One such tool is Toad for MySQL.
Toad is a free developer tool that helps you:
- Quickly create and execute queries
- Automate database object management
- Develop SQL code more efficiently
- Compare, extract, and search for objects
- Manage projects
- Import/export data
- Administer databases
- Increase productivity
- Access an active user community
Toad for MySQL's features include:
- Version Control Integration: Check in and check out code
- Macro Record and Playback: Record and play back keyboard commands
- Database Browser: Reorganize and manage objects and object types
- Code Snippet Editor: Create and alter code snippets for expand-and-collapse code blocks
- Security Manager: Permit or restrict user access to specific features
- SQL Editor: Create, execute, modify, and save queries; view and edit data; process DDL commands.
- Fast, Multi-Tabbed Schema Browser: Display and manage database objects graphically
- DB Extract, Compare-and-Search Utility: Compare two MySQL databases, view the differences, and create the script to update the target
- Import/Export Utility: Transfer data across MySQL databases
Since Toad is a Windows tool, the installation is just a matter of downloading the latest stable (click the Download button here and fill out the necessary information) and then following these steps:
- Unzip the downloaded file.
- Change into the newly created file.
- Double-click the ToadforMySQL_Freeware installation file.
- Walk through the installation wizard.
The Toad for MySQL main window. (Click the image to enlarge.)
Setting up connections
First, you need to create connections. Whether you are connecting to a local MySQL server or a remote server, it's quite simple.
- Go to File | New | Connection.
- In the Create New Connection dialog (Figure B), enter the necessary information for the connection.
- Click Save.
You can label a connection as Development, Production, Test, or create your own labels. (Click the image to enlarge.)
From the Connection Type drop-down shown in Figure B, you can select from these types of connections:
- Named Pipe
- HTTP Proxy
- HTTP Tunnel
If you are connecting to a remote server, you have to make sure the machine Toad is installed on has permission to access the remote MySQL database server.After you create the new connection, it will be listed in the Connection Manager. Double-click the new connection, enter the password for the connection, and click Connect. You should be presented with the Information Schema browser on that server (Figure C). Figure C
Select the different Schema on this server from the Information Schema drop-down immediately below the tabs in the middle pane. (Click the image to enlarge.)
Creating a database (schema)
- Go to File | New | Database and give the database a name.
- Click OK.
Now if you click the Information Schema drop-down, you should see that new database listed.
Creating a table on a database
- Select the new database from the Schema drop-down.
- Click the Create A Table button in the Tables tab for the database.
- In the General tab, give the table a name.
- In the General tab, select the database engine.
- In the General tab, configure any other options necessary.
- In the Columns tab, select the data type.
- In the Columns tab, configure the length.
- In the Columns tab, if more columns are needed, click the Add button.
- Click OK.
Click the image to enlarge.
We created a fairly basic table. There is quite a lot more that Toad for MySQL can handle, but now you should have a grasp on getting it up and running and using it to handle some simple tasks. If you're a DBA, you most likely can take it from here.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.