MySQL connect failed lazarus / 16-Databases ---------------------------------------------------------------------- ironman139 · 2016-10-21 02:28 Hello, I try since 3 days to set up my Lazarus SQL programm. I have a local Mamp server running. I can connect from every computer to the server, and PHPMyAdmin. But when i try to connect to the SQL database with my Lazarus programm its not possibel, (-> picture) I created a short php script and this one connects to my sql database without any problems. (->picture) 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 unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, mysql56conn, sqldb, FileUtil, Forms, Controls, Graphics,  Dialogs, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    Edit1: TEdit;    Edit2: TEdit;    Edit3: TEdit;    Memo1: TMemo;    MySQLConnection1: TMySQL56Connection;    SQLConnector1: TSQLConnector;    SQLQuery1: TSQLQuery;    SQLTransaction1: TSQLTransaction;    procedure Button1Click(Sender: TObject);  private    { private declarations }  public    { public declarations }  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);begin  // Set the connection parameters.    MySQLConnection1.HostName := '192.168.1.119:8889';    MySQLConnection1.UserName := 'root';    MySQLConnection1.Password := 'root';    MySQLConnection1.DatabaseName := 'implantec'; // MySQL is allways there!    //ShowMessage('Opening a connection to server: ' + 'SQL');    MySQLConnection1.Open; end;  end. ---------------------------------------------------------------------- marcov · 2016-10-21 05:45 Is port really allowed to be part of hostname that way I wonder. (and I replied that on SO yesterday too). Did you really research this item in the wiki as I advised? ---------------------------------------------------------------------- Omirbay · 2016-10-21 07:47 Hello! Recently, I was creating app that works with Mysql database. I think you also need to copy proper libmysql.dll connector library to your system directory (c:\windows\system32) / app exe directory. Also. For your information whether you noticed or not, in object inspector of mysql56 component there is a field dedicated for port if not mistaken. Try these out, if does not help, wud be happy to help. Since my program is running without problems now. With respect, Omirbay ---------------------------------------------------------------------- ironman139 · 2016-10-21 14:49 I have the .dll in my project dir and in system32. I removed the port from the Hostname and added it in the settings directly. Unfortunately no change ... Regards Tim ---------------------------------------------------------------------- Omirbay · 2016-10-26 12:24 Hi there! Bear in mind that  Libmysql.dll n ur windows os version shud be identical as well as ur lazarus mysql connection component. Luk forward to hearing from u soon about ur achievements. Wiz respect Omirbay ---------------------------------------------------------------------- ironman139 · 2016-10-27 01:57 I figured it out. It was a problem between different version´s of the MySQL