Databaes VI Doesn’t Find the MySQL Server

Updated Mar 5, 2024

Reported In

Software

  • Database Connectivity Toolkit
  • LabVIEW
  • TestStand

Issue Details

I'm using a MySQL database(DB) for logging all measured data. However, in my system, I have faced an issue during the logging. LabVIEW examples concerning the Databases, couldn't find and connect MySQL DB. 

Solution

You need to configure the ODBC data source, for this make the following steps:
  1. Install Connector/ODBC (Select the correct bits according to your application).
  2. Open ODBC Data Sources from the Windows Start.
  3. ODBC Data Source Administrator:
    1. Use the ODBC Data Source Administrator to create a Data Source Name (DSN) and the corresponding database: Start>>Settings>>Control Panel>>Administrative Tools.
    2. Double-click the ODBC icon Data Sources (ODBC) to open the ODBC Data Source Administrator dialog box.                                             
    3. Select the System DSN tab when you want data source visible to all users on this machine.
      Select the User DSN tab when you want data source visible only for these users.
    4. Click Add and select MySQL ODBC Driver from the list:Screenshot 2024-03-05 160449.png
    5. Click Finish.
    6. Fill in the dialog box shown below with a unique Data Source Name of your choosing. teststand2 is used in this example.
    7. Type in the user name and password for the user created above. Both are case-sensitive.
    8. Select the database created above: teststand_mysql_db.
    9. Click Test to make sure the connection works. You should see the following message: Success; Connection was made!