Archive

Archive for the ‘linux’ Category

MySQL install fails on Ubuntu with static IP

March 12, 2008 Andrew Hahn 2 comments

Update:

It was not the static IP address, but the fact that due to a typo in /etc/network/interfaces the loopback device was not active.

Installing MySQL server on Ubuntu fails if the machine has a static IP address.

sudo apt-get install mysql-server

Results in:

Setting up mysql-server-5.0 (5.0.45-1ubuntu3.1) ...
* Stopping MySQL database server mysqld
...done.
* Starting MySQL database server mysqld
...fail!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.0; however:
Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
mysql-server-5.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

To fix this edit /etc/mysql/my.conf and change the bind-address to the static address of the machine. Then rerun apt-get to finish the configuration of the packages.

sudo apt-get -f install

Reported to Ubuntu launchpad