Connect to MySQL via unix socket lazarus / 16-Databases ---------------------------------------------------------------------- zakiwi · 2010-10-11 18:23 Hi there, I am wanting to connect to MySQL server 5.0 with unix sockets as opposed to TCP sockets. Is that possible (or advisable), and if so, how. Kind regards Zakiwi ---------------------------------------------------------------------- xenblaise · 2010-10-19 04:43 #include ... .. #define DBHOST "localhost" #define DBUSER "root" #define DBPASS "test" #define DBBASE "accounting" ... ... MYSQL mysql; ... ... ... mysql_init(&mysql); if(!mysql_real_connect(&mysql,DBHOST,DBUSER,DBPASS,DBBASE,0,NULL,0)) { printf("Error Connecting To Database\n"); free(truncated);  exit(1); } ... ... ... That's the code snippet Oh, it's c for linux