October 27, 2009 / by Ferdinand Rios / Howto, MySQL, PrimalSQL, PrimalTools / No Comments

Connecting PrimalSQL to MySQL 5.1

Many organizations use MySQL as the back end database to their web sites and other infrastructure operations. While MySQL offers its own set of GUI too for database management, using a generic database tool like PrimalSQL has several advantages, especially when operating in a mixed database environment.

It is fairly simple to connect PrimalSQL to your MySQL 5.1 database. Follow the outlined steps below and you will be connected in no time!

1) Presumably you have a MySQL 5.1 database installed either locally or on a server somewhere. If you want to test this on a new installation, you can download MwSQL 5.1 from http://www.mysql.com. Select the OS that you will be installing under and download the MSI. Its a fairly straight forward install which walks you through creation of an account, etc. Be sure to download the ODBC connector and install that as well. Optionally, you may want to download and install the MySQL Gui tools, but, hey, what we really want to do is use PrimalSQL, right?

2) Once you have MySQL installed, create an ODBC connection using the Data Sources Control Panel applet. Once you have ODBC Data Source Administrator window open, create a User DSN or system DSN by adding a new data source. Select “MySQL ODBC 5.1 Driver as the driver and press Finish.

Create New Data Source

This will pop up the MySQL Connector/ODBC Data Source Configuration window. Fill in a name for your DSN, description, server location (in this case localhost). The port defaults to 3306. You also need to fill in your MySQL credentials. Optionally, you can select the default database as well from the dropdown. Test the connection. If all is well, press OK to create the data source.

MySQL Connector

3) Open PrimalSQL. Click the Connection button on the ribbon and select New.

4) In the Provider Pane of the Data Link Properties window, select Microsoft OLE DB Provider for ODBC Drivers and press Next.Data Link Properties Provider pane

5) On the Connection pane, select the MySQL DSN that you created in step 2 under Use Data Source Name. Enter your credentials and select an initial catalog. Test the connection. If all goes well, press OK.

Data Link Properties Connection pane

6) A new Connection will show up in the PrimalSQL Database Browser panel. Rename it to something that makes sense to you.

7) Double click the connection to connect it. Right click on the connection and select Set As Active Connection.

PrimalSQL Database Browser

8) You should be able to see your Stored procedures, views and tables listed under the connection. PrimalSQL will allow you to query your tables using the Visual Query Builder or by writing SQL code. At this time, PrimalSQL does not support the editing of Stored Procedures in MySQL.

PrimalSQL is available as a free 45 day trial at http://www.primaltools.com. Check it out and let us know what you think.

RSS SAPIEN Info Center

Search the Archives

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)





PowerShell Links