MySQL Open Time Delay menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1627
    Join Date
    May 2010
    Posts
    1,846
    Thanks G/R
    193/539
    Trade Feedback
    16 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    MySQL Open Time Delay

    I have run into a problem. It takes 30 seconds to connect to my MySQL server. I had set some brake point and found out that it was pausing at [conDatabase.Open();]. It does not just happen to me, so its not my internet. I have set the primary key in the database to what I am looking for. This is what I have,

    Code:
    try
    {
    MySqlConnection conDatabase = new MySqlConnection("Server=xxxxxxxx.com;Database=xxxxxxxx;Uid=xxxxxxxx;Pwd=xxxxxxxx;");
    string statment = "SELECT * FROM users WHERE username =@user;";
    MySqlCommand cmdDatabase = new MySqlCommand(statment, conDatabase);
    cmdDatabase.Parameters.AddWithValue("@user", username);
    
    MySqlDataAdapter da = new MySqlDataAdapter(cmdDatabase);
    DataSet ds = new DataSet();
    DataTable dt = new DataTable();
    
    conDatabase.Open();  //<-- 25 to 30sec!!
    da.Fill(ds, "password");
    
    dt = ds.Tables[0];
    foreach (DataRow row in dt.Rows)
    {
       RetrunPassword = row["password"].ToString();
    }
    cmdDatabase.ExecuteNonQuery();
    conDatabase.Close();
    password = CalculateMD5Hash(username, password);
    catch (Exception Errorz )
    {
    MessageBox.Show(Convert.ToString(Errorz ));
     return false;
     }
    I know this is a 1/2 ass way of doing it, so I am thinking that is part of the problem.

    Thanks for your help!
    Last edited by DarkLinux; 04-08-2011 at 02:05 AM.

    MySQL Open Time Delay

Similar Threads

  1. Replies: 25
    Last Post: 04-01-2014, 08:52 AM
  2. [Buying] WTB: D3 Gold (EU) , Nav's Gold buying shop is open! Time to sell your stock!
    By nav4321 in forum Diablo 3 Buy Sell Trade
    Replies: 1
    Last Post: 06-08-2012, 03:05 PM
  3. Open mailbox and guild bank at same time?
    By Ssateneth in forum World of Warcraft General
    Replies: 6
    Last Post: 04-01-2009, 10:58 PM
All times are GMT -5. The time now is 08:39 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search