0% found this document useful (0 votes)
2K views

LabVIEW - Connect To MySQL

This document provides instructions for connecting to a MySQL database locally or remotely from LabVIEW on Windows. It describes how to install the MySQL server and ODBC drivers locally, configure a data source name in the ODBC administrator to specify connection details, and then connect to the database from LabVIEW using the configured name. It also notes that a remote database can be connected to by specifying the server's IP address instead of localhost.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

LabVIEW - Connect To MySQL

This document provides instructions for connecting to a MySQL database locally or remotely from LabVIEW on Windows. It describes how to install the MySQL server and ODBC drivers locally, configure a data source name in the ODBC administrator to specify connection details, and then connect to the database from LabVIEW using the configured name. It also notes that a remote database can be connected to by specifying the server's IP address instead of localhost.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Local & Remote Connection to MySQL from LabVIEW (Windows)

Local Connection Install mySQL Community Server (download from http://dev.mysql.com/downloads/mysql/). Install windows ODBC drivers (download from http://dev.mysql.com/downloads/connector/odbc/). Install the LabVIEW Database and Connectivity Toolkit

Open the Data Sources (ODBC) Administrator under Control Panel>>All Control Panel Items>>Administrative Tools.

Open the Drivers Tab and ensure the MySQL ODBC drivers are installed.

1/6 JGCODE

Local & Remote Connection to MySQL from LabVIEW (Windows)

Under User DSN Tab select Configure

Configure the database with the following settings. Give the Data Source a name. This is the name you will connect to it from LabVIEW. Enter a description. If the server is located on this computer leave blank or enter localhost. The default port is 3306. The default user name is root. The default password is blank.

The Database drop down list will populate with available database for that Username and Password. Select a database and press select to test the connection.

Note: You do not need to configure the Username and Password as you can pass these parameters into LabVIEW. However, you will not be able to see the databases on the server if you do not enter them.

2/6 JGCODE

Local & Remote Connection to MySQL from LabVIEW (Windows)

The database will appear in the User Data Sources list.

Note: You can configure a User DSN for a specific user or a System DSN for all users. 3/6 JGCODE

Local & Remote Connection to MySQL from LabVIEW (Windows)

The database can now be called from LabVIEW using the Database Connectivity Toolkit using the Data Source Name as Connection Information string input.

4/6 JGCODE

Local & Remote Connection to MySQL from LabVIEW (Windows)

Remote Connection

Connect to a remote database by supplying the server IP address. Ensure the selected port is allowed by the firewall (the default is blocked). Use LabVIEW is the same way (username and password optional).

5/6 JGCODE

Local & Remote Connection to MySQL from LabVIEW (Windows)

Links

Configuring a Connector/ODBC DSN on Windows http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-windows.html

Using MySQL with the Database Connectivity Toolkit on Windows http://digital.ni.com/public.nsf/allkb/47A8CF66D5E3C8CC8625720A006139D6

Setting up a Database through ODBC http://zone.ni.com/devzone/cda/tut/p/id/4855

LabVIEW Database Connectivity Toolkit Help http://www.ni.com/pdf/manuals/371525a.pdf

LabVIEW Database Known Issues http://zone.ni.com/reference/en-XX/help/370052F-01/tssuppref/database_known_issues/

6/6 JGCODE

You might also like