Connect AdvancedHMI to MySql Database Error?

This isn't a solution, but just to get your feet wet I would roll back on MySQL to 5.7 and see what you get. In my opinion there really isn't anything in 8 that you need right now.

Thanks, I will give that a try...

Our IT dept requested MySql, we have other equipment that uses MySql and Indusoft HMI software to export PLC data.
 
Here is the vb code that I have in so far:




Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim MySqlConn As MySqlConnection

MySqlConn = New MySqlConnection
MySqlConn.ConnectionString = "server=localhost;userid=root;password=Splash123;database=database"

Try
MySqlConn.Open()
MessageBox.Show("Connected")
MySqlConn.Close()

Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
MySqlConn.Dispose()

End Try

End Sub

End Class

What you have copied and pasted into the forum as your first post has a space in the word "database" in the SQL connection string. Oddly, when I quote your first post using the forum quote button, that space disappears. Is there by some chance a non-printing character present in the SQL connection string?

EDIT: When quoted in the reply box, the space is not present, when I hit POST, the space returns.
 
I'm not sure how you'd insert a non-printing character in a string in Visual Studio without seeing it, but I'd delete the string and type it back in just to be sure.
 
I'm not sure how you'd insert a non-printing character in a string in Visual Studio without seeing it, but I'd delete the string and type it back in just to be sure.

It sounds like we already established his code works. It's a .net framework version issue. He said he built a project that worked, until he set .net to version 4, then it didn't. Archie also pointed out the MySQL connector requires 4.5.
 
It sounds like we already established his code works. It's a .net framework version issue. He said he built a project that worked, until he set .net to version 4, then it didn't. Archie also pointed out the MySQL connector requires 4.5.

And I fully agree with you. This is probably an issue with the forum software and not with the code, but this would take all of 30 seconds to rule out.
 

Similar Topics

Hello, friends, I am trying to upgrade a system that uses an Onrom incremental encoder (E6B2-CWZ6C) connected to a Danfoss VFD (FC360), but now...
Replies
4
Views
249
I will find cable series but I don't know for fs260 model, kindly suggestions and help to me for connect cable
Replies
1
Views
95
Hi all, I'm having difficulties trying to connect FactoryTalk View SE Local Station (V13.00) to MS SQL Server Express. I state that they are...
Replies
2
Views
109
I am using Mitsubishi PLC :FX3g and downloaded the program in it. When I connect Mitsubihi FX2N-4DA expansion module, it lost its communication...
Replies
3
Views
243
Hi, The VersaMax PLC suddenly stop running (no LED on run function) so I'm trying to upload the program. The HMI connected to it says "Host...
Replies
0
Views
117
Back
Top Bottom