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

Greetings, I had an issue with a RIO rack 2 and IFM I/O Link dropping on my network. I would loose connection for a second or 2 then they would...
Replies
3
Views
108
Hi friends, i need a help to know the procedure and steps to connect Lenze i700 to PC for parameterize. i tried with lenze easy-starter using LAN...
Replies
0
Views
61
Hi, We have been facing a issue with SCADAPack 474. Configuration is like below. RTU 474 + 6103 PS + 5606 IO Mix Module + 5414 DI Module Only...
Replies
0
Views
84
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
12
Views
373
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
138
Back
Top Bottom