Home > linux, mysql, ubuntu > MySQL install fails on Ubuntu with static IP

MySQL install fails on Ubuntu with static IP

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

  1. carlos
    April 3, 2008 at 4:18 pm | #1

    Thank you!

  2. November 16, 2008 at 11:48 am | #2

    That solved my problem exactly!! Thanks a million for documenting that.

  1. No trackbacks yet.