Home » Categories » CHARTrunner » CR Data Source

CR: MySQL Data Source

This article explains how to use MySQL as the data source for CHARTrunner or CHARTrunner Lean.

CHARTrunner Lean is used in this discussion, but the concepts also apply to CHARTrunner.

CHARTrunner and CHARTrunner Lean are 32-bit programs, so you need to install the 32-bit version of the MySQL ODBC driver (even if you have a 64-bit operating system). You can download the driver from:


After the driver is installed, follow these steps:

For 64-bit Windows you must open the 32-bit ODBC control panel. On my 64-bit Windows 7 computer I went to Control Panel and clicked on "ODBC (32-bit)" which actually opened the 64-bit ODBC control panel (that was confusing). I had to use Windows Explorer to open the 32-bit ODBC Control Panel here: "C:\Windows\SysWOW64\odbcad32.exe".

For 32-bit Windows you can simply open the Control Panel and click on ODBC.

The ODBC Control Panel will open (the Windows 7 version is shown above). On the Drivers tab you should see one or more MySQL drivers listed. Make note of the name of the MySQL driver, which was "MySQL ODBC 5.3 ANSI Driver" in my case.

Create a new chart in CHARTrunner Lean. On the Edit Data Source step of the new chart wizard select ODBC provider as the Data Source. Click the Edit button for the Connection String field and enter a connection string like the one shown below. The is the DSN-less type of ODBC connection string, which is nice because all you need to do is install the MySQL ODBC driver - you do not have to create a DSN (Data Source Name) on each computer where CHARTrunner Lean will chart data from MySQL.

Driver={MySQL ODBC 5.3 ANSI Driver};Server=YourServerName;Port=3306;Option=131072;Stmt=;Database=YourDatabaseName;Uid={{USER}};Pwd={{PASSWORD}}

Regarding the "Driver={mySQL ODBC 5.3 ANSI Driver}" portion of the connection string. What you need to enter between the braces is the name of the MySQL driver that you saw on the Drivers tab of your ODBC Control Panel as explained previously. I chose the ANSI version of the driver - I imagine the Unicode version would also work but I didn't try it.

In place of YourServerName you should enter the DNS name, computer name or IP address of the MySQL server.

In place of YourDatabaseName you should enter the name of the MySQL database you want to connect to.

I used the {{USER}} and {{PASSWORD}} macros in the connection string in place of the user name and password. When these macros are used in the connection string you should enter the user name in theUser field and and the password in the Password field above the Connection String field. Alternatively, you can enter the username and password directly into the connection string in place of{{USER}} and {{PASSWORD}} (but then the password is visible to anyone who looks at the connection string).

Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Query to fetch the Last N rows of data from a table or view
Viewed 4390 times since Thu, May 28, 2009
CR: Simultaneous Use of CHARTrunner and Excel with a Workbook
Viewed 2674 times since Fri, Nov 9, 2007
CR: Tips for Using Microsoft Access as a Data Source
Viewed 1666 times since Fri, Nov 9, 2007
CR: Using Oracle Stored Procedures
Viewed 5028 times since Fri, Nov 9, 2007
CR: Charting from a Paradox password protected database
Viewed 1736 times since Fri, Nov 9, 2007
CR: Fetching Specification Limits from the Data Source
Viewed 1688 times since Fri, May 30, 2008
CR: FoxPro and MDAC Information
Viewed 1906 times since Fri, Nov 9, 2007
CR: Oracle Data Source
Viewed 9879 times since Fri, Nov 9, 2007
CR: SQL Server Data Source
Viewed 3787 times since Fri, Nov 9, 2007
CR: Honeywell Uniformance as a Data Source
Viewed 1853 times since Fri, Nov 9, 2007