Hi --
Installed MediaWiki from the ports tree on OpenBSD ... when I hit the MediaWiki config page, it fails to connect to mysql with the message: "MySQL error 2002: Can't connect to local MySQL server through socket /var/run/mysql/mysql.sock" However, MySQL is indeed running on that socket:
mysql> status -------------- mysql Ver 12.22 Distrib 4.0.24, for unknown-openbsd3.8 (i386)
Connection id: 2 Current database: Current user: jax@localhost SSL: Not in use Current pager: stdout Using outfile: '' Server version: 4.0.24 Protocol version: 10 Connection: Localhost via UNIX socket Client characterset: latin1 Server characterset: latin1 UNIX socket: /var/run/mysql/mysql.sock Uptime: 14 min 10 sec
Any tips?
Jack Woehr wrote:
Installed MediaWiki from the ports tree on OpenBSD ... when I hit the MediaWiki config page, it fails to connect to mysql with the message: "MySQL error 2002: Can't connect to local MySQL server through socket /var/run/mysql/mysql.sock" However, MySQL is indeed running on that socket:
Obvious questions: * Is Apache/PHP running in some kind of chroot or jail? * Is MySQL running in some kind of chroot or jail? * Are there extra permission restrictions on that socket file or its parent directories?
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
Obvious questions:
- Is Apache/PHP running in some kind of chroot or jail?
Yes. But the config web page for MediaWiki seems to demand that the socket exist in (unreachable) /var/run ... how do I change MediaWiki's configuration setup to tell it a chroot-accessible location to look for the socket?
Jack Woehr wrote:
Brion Vibber wrote:
Obvious questions:
- Is Apache/PHP running in some kind of chroot or jail?
Yes. But the config web page for MediaWiki seems to demand that the socket exist in (unreachable) /var/run ... how do I change MediaWiki's configuration setup to tell it a chroot-accessible location to look for the socket?
MediaWiki knows nothing about it, but php.ini does.
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
MediaWiki knows nothing about it, but php.ini does.
Yes, thank you, Brion!
The combination Apache/PHP/MySQL/MediaWiki has TOO MANY CONFIG FILES!! :-)
Jack Woehr wrote:
Brion Vibber wrote:
MediaWiki knows nothing about it, but php.ini does.
Yes, thank you, Brion!
The combination Apache/PHP/MySQL/MediaWiki has TOO MANY CONFIG FILES!! :-)
Check out this url for a pretty good how-to on configuring/installing Apache, PHP, and MySQL on OpenBSD 3.8:
http://www.freeyourbox.org/tutorials/bsd/obsd3.8_apache_php_mysql.html
For a quick solution, you may just want to try the following to fix your problem:
# mkdir -p /var/www/var/run/mysql # ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock
Curtis
Curtis Hatter wrote:
Jack Woehr wrote:
Brion Vibber wrote:
MediaWiki knows nothing about it, but php.ini does.
Yes, thank you, Brion!
The combination Apache/PHP/MySQL/MediaWiki has TOO MANY CONFIG FILES!! :-)
Check out this url for a pretty good how-to on configuring/installing Apache, PHP, and MySQL on OpenBSD 3.8:
http://www.freeyourbox.org/tutorials/bsd/obsd3.8_apache_php_mysql.html
Thanks, Curtis, Brion and others who provided excellent guidance.
mediawiki-l@lists.wikimedia.org