#11 Very long time to connect to a database in localhost !

open
nobody
None
5
2004-09-27
2004-09-27
Anonymous
No

Hi ,

I've got a problem with the followin code :

private void Page_Load(object sender, System.EventArgs e)
{
try
{
MyConnection = new MySQLConnection(new
MySQLConnectionString("localhost", "qualbil" , "root"
,"qualbil").AsString);
MyConnection.Open();
MySQLCommand MyCommand = new MySQLCommand("select *
from versions", MyConnection);
IDataReader MyDataReader =
MyCommand.ExecuteReader();
MyDataReader.Read();
Response.Write(MyDataReader[0].ToString() + " " +
MyDataReader[1].ToString());
}
catch (Exception)
{
Response.Write(e);
}
}

This Page opens a connection to my Mysql Database in
localhost but every connections makes a so long time !
I try every version of mysql (from 3.23 to 5.01) but
can't find a solution.
I think it's a DNS issue but i tried so many ways and
can't solve the problem !
Maybe it's the DHCP or something like that ...

Please help me

Guillaume - France

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I follow one thing ! I m on a win XP PRO SP 2
    Thanks

     
  • Polarina

    Polarina - 2006-05-10

    Logged In: YES
    user_id=1418276

    Try connecting to 127.0.0.1 instead of localhost.

     

Log in to post a comment.