Mysql5 + Lazarus + Ubuntu lazarus / 16-Databases ---------------------------------------------------------------------- zevang · 2007-06-26 20:29 Hello all, I installed Lazarus on Ubuntu 7.04, on a AMD64 machine. Decided to use the provided connection tools, since Lazarus seems to have Mysql as a native SGBD system. Configured the BD server, all running, access checked and working. When it comes to configure a connection inside Lazarus, that's a problem. I coudn't find any place where to indicate the Port number (3306 as a default), so the component can connect to MySql. I receive an error message every time I try to accomplish connection that states: "Server Connect failed" (I know this is the most generic message...) The components I'm using are: TMySQL50Connection TSQLTransaction TSQLQuery Is there anything else I must do to make things work? thanks in advance Zevang ---------------------------------------------------------------------- wryoung98 · 2007-06-29 05:39 What use did you create for mysql?  did you user localhost to connect and not your host name. mysql by default listens to localhost I believe. ---------------------------------------------------------------------- wryoung98 · 2007-06-29 06:09 http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtop ic&p=17524 got me working ---------------------------------------------------------------------- zevang · 2007-07-02 03:08 Hi wryounq98, As a test basis, I created only "root" user with a weak password. Inside Lazarus my connector looks at a host "localhost" (I've tried 127.0.0.1 as well, no results though). I can connect to the BD (wich BTW has tables and registers in it) via Query Browser and MSQL Administrator with no problem at all. I will take a good look at the address you pointed. thanks a lot, Zevang ---------------------------------------------------------------------- zevang · 2007-07-03 23:14 Hi again ;-) I downloaded the demo application into my Kubuntu Lazarus. Created a common user with privileges to access my test Database (called "atendimento") and loaded the app into the IDE. I then changed the line where the database name is filled into the property of MySQLConnection, where I put "atendimento". Got it to run, and the main form pops up in my screen. Filled fields with the proper information, like "localhost", "username", "password". After a hit in the "connect" button three messages appear at the memo box: "18:13:14.944: Opening a connection to server: localhost 18:13:15.170: Connected to server: localhost 18:13:15.170: Retreiving list of available databases" And a message box pops up like this: Title: "ptrymysql" "MySQLConnection1: Server connect failed Press OK to ignore..." Everything appears to be right, I manage to connect to Mysql using Query brower and Administrator. I can even make backups, retrieve them, create users, etc... Only Lazarus couldn't complete the connection. What would I have done wrong? ... :-) regards, Zevang ---------------------------------------------------------------------- zevang · 2007-07-04 17:51 Let me spice up the topic a little bit. So, I came back to Windows (XP) and did exactly what a did in Ubuntu. Surprise!!! Everything worked... (Funny that I was disappointed...) I used the same user name, password, permission type. The installation was also the same. Port number, host name, application, everything was simply equal. What would be a plausible explanation for Ubuntu version to keep giving me that "Server connect failed" message? Zevang