Connecting to MariaDB on XAMPP lazarus / 63-Database ---------------------------------------------------------------------- HappyLarry · 2016-10-19 12:19 I have XAMPP running on Linux. XAMPP is installed (automatically)  at /opt/lampp/. I have libmysqlclient18 5.6.3 installed.  XAMPP has MariaDB as part of it but Iunderstand that is fully compatible with sqldb and mysql. I also have a database called DB on it. The database user name is 'root' and it has no password as is standard for XAMPP. The database functions correctly and I can see the database through localhost/phpmyadmin. I am trying to connect Lazarus to it. 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 procedure TForm1.Button1Click(Sender: TObject); begin  MySQL56Connection1.Hostname := 'localhost';  MySQL56Connection1.DatabaseName:='DB';  MySQL56Connection1.UserName:='root';  MySQL56Connection1.Transaction:=SQLTransaction1;  SQLTransaction1.Database:=MySQL56Connection1;   SQLQuery1.Database:=MySQL56Connection1;  SQLQuery1.Transaction:=SQLTransaction1;  SQLQuery1.SQL.Text:='SELECT * FROM MyTable';   Datasource1.dataset:=SQLQuery1;  DBGrid1.DataSource:=DataSource1;   MySQL56Connection1.Open;  If MySQL56Connection1.Connected then  begin       Label1.caption:='connected';  end;end; I get an error Server connect failed'. Can anyone see what I am doing wrong? I suspect it is the database name but I don't know what I should put instead. ---------------------------------------------------------------------- HappyLarry · 2016-10-19 14:56 A bit more information: In XAMPP,  mysql is found at /opt/lampp/bin and I have changed my .bashrc file with PATH=${PATH}:/opt/lampp/bindb so that if I type mysql -u root anywhere then mysql (MariaDB) opens successfully. Unfortunately when Lazarus tries to connect, I still get the same error. ---------------------------------------------------------------------- rsouza · 2017-04-27 13:40 You also need to put the libs folder in your .bashrc.