Bug #66838 Try to connect on local IP rather than remote IP
Submitted: 16 Sep 2012 20:53 Modified: 8 Oct 2012 22:24
Reporter: Arnaud Dautry Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.5.4.0 OS:Microsoft Windows (Seven)
Assigned to: Roberto Ezequiel Garcia Ballesteros CPU Architecture:Any
Tags: MySqlConnection.Open, Visual Studio 2012

[16 Sep 2012 20:53] Arnaud Dautry
Description:
I use this code : 

Public connexion_MYSQL As New MySqlConnection

Dim conbuild As New MySqlConnectionStringBuilder
        conbuild.Server = 192.168.1.1
        conbuild.Database = My.Settings.Database
        conbuild.UserID = My.Settings.UserId
        conbuild.Password = My.Settings.Password
        conbuild.CharacterSet = "utf8"

connexion_MYSQL.ConnectionString = conbuild.GetConnectionString(True)

connexion_MYSQL.Open()

Open() methode return an exception : 
Access denied for user 'root'@'192.168.1.5' (using password: YES)

My connection string is Ok but Open() change the server IP(192.168.1.1) to my local address 192.168.1.5

I use Visual Studio 2012 Express And Mysql Connector/Net 6.5.4.0

My remote Server is on Linux Ubuntu 12.04
I have a local Mysql Server on Windows Seven (last release)

Any idea ?

Thank you.

How to repeat:
Public connexion_MYSQL As New MySqlConnection

Dim conbuild As New MySqlConnectionStringBuilder
        conbuild.Server = 192.168.1.1
        conbuild.Database = My.Settings.Database
        conbuild.UserID = My.Settings.UserId
        conbuild.Password = My.Settings.Password
        conbuild.CharacterSet = "utf8"

connexion_MYSQL.ConnectionString = conbuild.GetConnectionString(True)

connexion_MYSQL.Open()

conbuild.Server = remote server
[8 Oct 2012 22:24] Roberto Ezequiel Garcia Ballesteros
The reason is that the user "root" from host "192.168.1.5" has no access to the database server. Please check users in your database. Root user must be "root@%" or "root@192.168.1.5" in users list to allow connections from 192.168.1.5 host.