How to connect to MySQL database through Statistica Query builder with MySQL ODBC connector?

How to connect to MySQL database through Statistica Query builder with MySQL ODBC connector?

book

Article ID: KB0079264

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.0 and higher

Description

Statistica supports connection to MySQL database with MySQL ADO.NET driver or MySQL ODBC driver.
This article demonstrates how to connect to MySQL database with MySQL ODBC connector through Statistica Query Builder. 

Issue/Introduction

How to connect to MySQL database through Statistica Query builder with MySQL ODBC connector?

Environment

Windows

Resolution

1. Download and install MySQL ODBC connector if it has not been installed with your MySQL server: https://dev.mysql.com/downloads/connector/odbc/

User-added image


2. Go to Windows "Control Panel | Administrative Tools | ODBC Data Source" and create a new DSN connection to your MySQL database with MySQL ODBC Driver.
User needs to input the MySQL Server host name, port number, user ID and password to create the DSN connection.
Click "Test" to test the DSN connection before clicking Ok to save it. 

User-added image

3. Go to Statistica menu "Home | Open | Open External Data | Create Query", click on "New OLE DB" in the Database Connection dialog.
In the Data Link dialog, select "Microsoft OLE DB Provider for ODBC Drivers" and Click Next.
Find and select the DSN created in above step from the "Use data source name" drop-down list.
Click "Test Connection" to test the connection.
Click "Ok" and give a name to save the MySQL database connection. 
In the Database Connection dialog, select the saved MySQL database connection and Click Ok to open it. 
The data tables stored in the MySQL database are listed on the left panel of the Statistica Query window. User can add data tables of interest or manipulate the data with custom SQL query to be imported to Statistica for analysis.

User-added image

4. Alternatively, in Statistica Database Connection dialog, user can choose "New ADO.NET" option to connect to the DSN created above. 

User-added image