Welcome!

Search





Page: DebianMySQL


MySQL on Debian#

Issue#

In the default installation of MySQL on Debian, network access is disabled.

This can lead to confusing results, because when your test your Roller database setup with /usr/bin/mysql, everything seems to work fine. Still, Tomcat and Roller are not able to connect to the database.

Explanation#

/usr/bin/mysql connects successfully because it uses Unix domain sockets, which do not require network access. Tomcat and Roller, however, use Connector/J, which works through TCP/IP sockets, which does require network access.

Solution#

Enable network access in MySQL: Edit /etc/mysql/my.cnf, comment out the line saying "skip-network":

...

# The skip-networkin option will no longer be set via debconf menu.
# You have to manually change it if you want networking i.e. the server
# listening on port 3306. The default is "disable" - for security reasons.
#skip-networking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = thread_stack=128K

...

Disclaimer#

I am not sure if this is the most canonical or secure way of enabling MySQL network access on Debian. It works for me, though...

<br /> Jan 16, 2004 -new entry... I've been able to use a different mysql driver which does not require "promisquity" from mysql on a Debian environment. Using the connector driver does not seem to be a requirement.<br/> -Thembile.

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-12) was last changed on 17-Jan-2009 09:17 by DaveJohnson