MySQL Try SQLConnection.Open timeout problem? lazarus / 16-Databases ---------------------------------------------------------------------- xaver13 · 2020-03-30 17:41 Hello, I would like recognize if I can connect to MySQL database. I am using something as that: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   try    SQLConnection.Open;  except        On ESQLDatabaseError do           begin             ShowMessage('I can not connect to database');           Application.Terminate;           end;  end; But often it works not, especially in debug mode,  and ESQLDatabase error is shown. I continue: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   if SQLConnection.Connected then    begin      Query.Database := SQLConnection;      SQLTransaction.Database := SQLConnection;      Query.Close;      SQLTransaction.Active := True;      FormTexty.DataSource1.DataSet := Query;      Query.Close;      //Query.PacketRecords:=-1;      Query.SQL.Text :=          'Select  *  From vysledek';      Query.Open;      Debugln('*** Program started ' + RRRRMMDD(now));    end    else    begin        ShowMessage('I can not connect to database 2.');        Application.Terminate;    end;  And again sometime it works but mostly especially in debug mode not. Seems to me that I have some problem with timeout on     SQLConnection.Open ? Thank you for any clarify, advice..