how i can test the connection with mysql? lazarus / 16-Databases ---------------------------------------------------------------------- saul_linux · 2014-09-03 04:54 I am do a litle app, i need check if the server of mysql is down, but i don't know. I am using the MySQL55Connection  componet i tried Code: [Select]   try      MySQL55Connection1.Open;    finally      if MySQL55Connection1.Connected=false then      begin         ShowMessage('connection fail');      end;    end;      but when mysql is down, my app doesn't anything ---------------------------------------------------------------------- dogriz · 2014-09-03 05:43 Try like this: Code: [Select]   try      MySQL55Connection1.Open;      if MySQL55Connection1.Connected=false then         ShowMessage('connection fail');    except       //code for exception if you need it    end; ---------------------------------------------------------------------- taazz · 2014-09-03 05:48 in order to test if the sql server is present the only thing you need to have a simple tcp connection with the server succeed mysqlConnection does a lot more than opening a connection to the server it also initializes the server and client connection parameters and transactions. forget about testing with the MySQLConnection use a simple tcp client to connect to the server's ip and port make sure that the time out interval is small enough to avoid user waiting and big enough to allow the connection to take place before the time out.