Hi,
I'm having EXACTLY the same problem.
Until yesterday the application was connecting fine - it now connects at design time only.
Error message is:
Cant't connect to mysql server on 'localhost' (100061)
Username and password are correct.
Using the IP address (either 127.0.0.1 or the real IP address makes no difference).
I read username and password from the user
e.g.
Code: Select all
this.mySqlConnection1.Password = serverinformation.Password.Text;
this.mySqlConnection1.UserId = serverinformation.Username.Text;
this.mySqlConnection1.Host = serverinformation.ServerName.Text;
this.mySqlConnection1.Database = serverinformation.Database.Text;
this.mySqlConnection1.Open();
The 'design code' is this:
Code: Select all
this.mySqlConnection1.Compress = true;
this.mySqlConnection1.ConnectionString = "User Id=linearuser;Password=lineartest;Host=localhost;Database=masons2;Compress=T" +
"rue;Protocol=Tcp;";
this.mySqlConnection1.Name = "mySqlConnection1";
this.mySqlConnection1.Owner = this;
Edit: The connection can't be timing out because its returning with the error in less than a second.
I have tried deleting the MySQLConnection object and recreating it, but the same scenario repeats.