labview - connect to mysql (1)

6
Local & Remote Connection to MySQL from LabVIEW (Windows) 1/6 JGCODE 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.

Upload: davidleonardo-galindo

Post on 08-Nov-2014

548 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

1/6

JGCODE

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.

Page 2: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

2/6

JGCODE

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.

Page 3: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

3/6

JGCODE

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.

Page 4: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

4/6

JGCODE

The database can now be called from LabVIEW using the Database Connectivity Toolkit using the

Data Source Name as Connection Information string input.

Page 5: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

5/6

JGCODE

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).

Page 6: LabVIEW - Connect to MySQL (1)

Local & Remote Connection to MySQL from LabVIEW (Windows)

6/6

JGCODE

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/