LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL connectivity issues

Solved!
Go to solution

wiebe@CARYA wrote:

 

You need to be especially careful with ODBC and passwords, as the passwords are stored as plain text in the registry.


That is not necessary! You can for most drivers simply leave the username and password empty in the ODBC Administrator setup (or not mention the UID and PWD keywords in the connection string) and supply the parameters to the DB Tools Open Connec (String/Path).vi from your application through the specific parameters.

 

And for the "ODBC Driver 17 for SQL Server" you can even add a parameter to the connection string "Authentication=ActiveDirectoryIntegrated" and then it will attempt to use a SSO configuration for your server if that was setup correctly in Active Directory for the SQL Server configuration, even if the server is running in the Azure cloud. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 23
(1,127 Views)

I have indeed used those same connection strings, inputting my pertinent information of course. And received the error "Operation cannot be executed because an error occurred during connection to the driver".

 

I am feeling fairly defeated at this point with the MySQL situation. 

Are there other free databases and database managers that work similar to MySQL that folks would recommend?

Or does any have other suggestions to try?

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 12 of 23
(1,122 Views)

But what library are you using? NIs database connectivity toolkit? There are others...

 

The choice for a database depends on the needs.

 

Does it need to be centralized (SQLServer)? Or file based (Access, SQLite, even a .txt file can be accessed through SQL).

0 Kudos
Message 13 of 23
(1,115 Views)

@rolfk wrote:

wiebe@CARYA wrote:

 

You need to be especially careful with ODBC and passwords, as the passwords are stored as plain text in the registry.


That is not necessary! You can for most drivers simply leave the username and password empty in the ODBC Administrator setup (or not mention the UID and PWD keywords in the connection string) and supply the parameters to the DB Tools Open Connec (String/Path).vi from your application through the specific parameters.


Could have been clearer: careful if you set a password in ODBC, because it will be stored in the registry.

0 Kudos
Message 14 of 23
(1,110 Views)

It is for a project creating a working inventory management system. There will be centralized computer on premise as the server and it will accessible via any computers on the network. And yes, I am presently using the Data Connectivity Toolkit.

 

Thank You

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 15 of 23
(1,107 Views)

We gave up on the DB Toolkit a while back and use this for communicating with MySQL.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 16 of 23
(1,096 Views)

This is where I am at currently. 

I was able to use a 32 bit data source with the MySQL ODBC 5.3 ANSI Driver. I created the source and had a successful connection using the local host. Using the DB toolkit and a proper connection string I was able to connect and list my databases tables as a test without issue. 

Fast-forward...Now trying for remote connectivity via client computer. Exact same code as previously used on host computer. Except I adjusted the string to reflect the host computers IP instead of the default localhost. Now it says the data source does not work and there is no specified driver. 

<see attached photos>

Capture is the failed attempt at remote access 

Capture 2 is the successful connection to the server and database on the host computer.

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Download All
Message 17 of 23
(1,089 Views)

First thing I'd do is to (try to) ping the machine.

 

Next, temporarily disable the firewall.

 

Maybe the driver bitness (32\64) and the server machine bitness need to match? Do they match?

 

Can you validate the connection with some other (MySQL) tool. I'm no expert, but at a glance there seems to be command line tools for MySQL. The mysql Command-Line Tool - Techotopia

0 Kudos
Message 18 of 23
(1,071 Views)

I have pinged the machine from every computer in the office and had no issues. I adjusted everything to ensure there was no architecture mismatches across the whole of the network. Double checked bitness across LV, drivers, MySQL, etc. The firewall has been disabled for the last 3 days. Still to no avail. I honestly don't know what to do with it. I have never seen such an issue persist. It is more than likely some exceedingly simple adjustment that needs to be made, but for whatever reason myself nor the other programmer in the office seem to be able to find the issue.

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 19 of 23
(1,056 Views)

Have you made a try with the development computer to dial to a server and not to a localhost ? You can face issues with the port maybe.

Localhost is cool to try a function but ,in my opinion, it will never confirm that a process is fully working as it can bypass things.

0 Kudos
Message 20 of 23
(1,043 Views)