Can't connect to MySQL server on 'localhost' (10061)
Can't connect to MySQL server on 'localhost' (10061)
I am new for using this software.
MySqlConnection myConn = new MySqlConnection("User Id=root;Password=password;Host=localhost;Database=disb_db");
myConn.Open(); (The error is occur from here).
How to solve this problem, I am using trial version and i am using debug to test. choose poket pc emulator 2003. Thx for help.
MySqlConnection myConn = new MySqlConnection("User Id=root;Password=password;Host=localhost;Database=disb_db");
myConn.Open(); (The error is occur from here).
How to solve this problem, I am using trial version and i am using debug to test. choose poket pc emulator 2003. Thx for help.
Re: Can't connect to MySQL server on 'localhost' (10061)
Use IP address of MySQL Server host in the connection string.zendic wrote:User Id=root;Password=password;Host=localhost;Database=disb_db
Can't connect to MySQL server on 'localhost' (10061)
Still same the error. If i change the host to IP address of MySql Server Can't connect to MySQL server on '127.0.0.1' (10061).
Re: Can't connect to MySQL server on 'localhost' (10061)
My Code:zendic wrote:Still same the error. If i change the host to IP address of MySql Server Can't connect to MySQL server on '127.0.0.1' (10061).
try
{
MySqlConnection myConn = new MySqlConnection("User Id=root;Password=password;Host=127.0.0.1;Database=disb_db");
myConn.Open();
MySqlCommand myCommand = new MySqlCommand("select * from m_stkmst", myConn);
myCommand.Parameters.Add("?", testText.Text);
Int64 count = Convert.ToInt64(myCommand.ExecuteScalar());
Console.WriteLine(count);
myConn.Close();
}
catch
{
throw;
}
Can't connect to MySQL server on 'localhost' (10061)
I alr set my IP to True ip = 192.168.1.107.
The error is still same...
Any solution or example, Thanks.
I want to purchase the product if it is can use in the pocket pc.....
The error is still same...
Any solution or example, Thanks.
I want to purchase the product if it is can use in the pocket pc.....
Did you set the port number in your connection string?
Are you able to connect in design time?
I've sent you a test program (zipped and renamed to *.txt) to ngeiji at gmail dot com. Specify your host address and port number and click Ping button. If you don't get MySQL Server's version then something wrong with your server.
Are you able to connect in design time?
I've sent you a test program (zipped and renamed to *.txt) to ngeiji at gmail dot com. Specify your host address and port number and click Ping button. If you don't get MySQL Server's version then something wrong with your server.
-
- Posts: 2
- Joined: Wed 08 Aug 2007 09:35
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.
The 'design code' is 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.
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;
I have tried deleting the MySQLConnection object and recreating it, but the same scenario repeats.
-
- Posts: 2
- Joined: Wed 08 Aug 2007 09:35
And I've found the problem
I had edited my app.config file to try and enable JIT debugging yesterday.
So it was along these lines
the variable 'somesettinghere' doesnt matter - can be anything
removing that line
fixes the problem...
I had edited my app.config file to try and enable JIT debugging yesterday.
So it was along these lines
Code: Select all
somesettinghere = "1"
removing that line
Code: Select all