[Mod_log_sql] Connection error on Fedora 3 using local socket connection
urkle at outoforder.cc
Fri Nov 19 00:44:34 EST 2004
Quoting Darryl Weaver <darryl at weaverweb.co.uk>:
> Hi All,
> I am having a problem with getting this to work on Fedora 3.
> I have a full install (i.e. everything) of Fedora 3.
I just finished installing that in Vmware yesterday.
> I have then removed the installed libdbi libraries and drivers (i.e. the
> rpms - libdbi, libdbi-dbd-mysql & libdbi-dbd-pgsql that were version
That seems really odd that FC3 would have libdbi 0.6 still installed.
> I have then installed the latest versions of libdbi from the website
> from source.
> LoadModule log_sql_module modules/mod_log_sql.so
> LoadModule log_sql_mysql_module modules/mod_log_sql_mysql.so
> <IfModule mod_ssl.c>
> LoadModule log_sql_ssl_module moduels/mod_log_sql_ssl.so
> LogSQLLoginInfo mysql://username:password@localhost/apachelogs
> LogSQLCreateTables on
> LogSQLDBParam socketfile /var/lib/mysql/mysql.sock
> I then add a directive to a virtual host of:
> LogSQLTransferLogTable access_log
> [Wed Nov 17 22:07:29 2004] [error] mod_log_sql: database connection
> error: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (13)
> [Wed Nov 17 22:07:29 2004] [error] mod_log_sql: child spawned but unable
> to open database link
This looks like the unix socket is in a different place or different file
permissions.. you need to find the mysql.sock file and set the
LogSQLDBParam socketfile /path/to/mysql.sock
> I go to the virtualhost and it writes out the SQL statements to
> /etc/httpd/logs/mod_log_sql-preserve (not
> /tmp/sql-preserve as I expected from the docs).
That was a recent change.. I'll make sure it gets in the docs for the next
> Looking at that file that seems to have all the right information.
> Any help would be most appreciated as I'm running out of things to try.
> I could go back to the pre-installed versions of libdbi, but they do not
> meet the requirements as stated (i.e. libdbi >= 0.7).
Well, your current setup is not using libdbi anywhare.. it's using striaght
mysql client libs.
> Software versions are:
> Fedora core 3 (plus current updates)
> Apache 2.0.52
> Install from source:
> So, any ideas?
> Best Wishes,
> Darryl Weaver
> Weaver Web Ltd
> 0870 741 0761
> Download the latest version at
> To unsubscribe send an e-mail to
> mod_log_sql-unsubscribe at lists.outoforder.cc
Edward Rudd <urkle at outoforder.cc>
Web Page <http://www.outoforder.cc/>
More information about the Mod_log_sql