Connection error on Fedora 3 using local socket connection
Darryl Weaver <[email protected]> Wed, 17 Nov 2004 22:26:03 +0000
| Newsgroups | gmane.comp.apache.mod-log-sql |
|---|---|
| Message-ID | <[email protected]> |
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 have then removed the installed libdbi libraries and drivers (i.e. the rpms - libdbi, libdbi-dbd-mysql & libdbi-dbd-pgsql that were version 0.6.x). I have then installed the latest versions of libdbi from the website from source. So, I now have libdbi 0.7.2 and libdbi-drivers 0.7.1 installed. I have then downloaded mod_log_sql-1.99 and extracted the source. I have downloaded both the diff files and patched the source. I then successfully ran configure and make and make install. I then set up a new database called apachelogs and a new database user with create and insert privileges. I then create the entries for apache, which I do from an include file as follows: /etc/httpd/conf.d/mod_log_sql.conf: 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 </IfModule> 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 I restart mysql and make sure the debug logging is enabled. I can log in to the mysql database with the command: mysql -u username -p password apachelogs the /var/log/mysqld.log file then shows me the connection and all the queries OK. However, when I start apache I get the following in the error_log: [Wed Nov 17 22:07:22 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Nov 17 22:07:23 2004] [notice] Digest: generating secret for digest authentication ... [Wed Nov 17 22:07:23 2004] [notice] Digest: done [Wed Nov 17 22:07:23 2004] [notice] LDAP: Built with OpenLDAP LDAP SDK [Wed Nov 17 22:07:23 2004] [notice] LDAP: SSL support unavailable [Wed Nov 17 22:07:28 2004] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads. [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 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). Looking at that file that seems to have all the right information. So, why isn't the module able to connect to the local mysql socket file when the other mysql apps can do so? There doesn't seem to be anything wrong with the filename or path and it is all accessible to the apache user who runs apache. 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). Software versions are: Fedora core 3 (plus current updates) Apache 2.0.52 mysql-3.23.58 Install from source: libdbi-0.7.2 libdbi-drivers-0.7.1 So, any ideas? -- Best Wishes, Darryl Weaver Director Weaver Web Ltd 0870 741 0761 http://www.weaverweb.co.uk _______________________________________________ Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/ To unsubscribe send an e-mail to mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org