4

I had a broken installation of mariadb over mysql 5.5. For hours i have tried to reinstall mysql with the usage of apt-get - tried to purge, remove etc everything mysql related. Uninstalled php aswell. Apache got reinstalled too. Every single install was throwing errors during mysql-server configuration. I finally managed to perform a succesfull installation from deb package from website. I ran this after the package was installed:

sudo apt-get install mysql-server-5.5 Installtion failure part:

Setting up mysql-server-5.5 (5.5.35-0ubuntu0.12.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems     prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up libmariadbclient18 (10.0.8+maria-1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
mysql-server-5.5
mysql-server

All right, so I ran sudo dpkg --configure mysql-server-5.5 and got

Setting up mysql-server-5.5 (5.5.35-0ubuntu0.12.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5

If we try to run mysql we get

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Which guides me back to my.cnf manipulation and mysql reinstallation. Goddamn closed error circle.

I have tried every solution related to mysql installation I have found. Really running out of options here, reinstalling and configuring ubuntu would be easier and faster. Any feedback appreciated.

EDIT: One notice - why am I prompted for mysql admin password 3 times during an installation?

Tim
  • 32,274
  • 27
  • 118
  • 177
user1928689
  • 141
  • 1
  • 3
  • try to install webmin by $wget http://prdownloads.sourceforge.net/webadmin/webmin_1.670_all.deb then $dpkg -i webmin_1.670_all.deb then $apt-get -f install and connect though web by https://yourserverip:10000 and from servers part, try to connect to MySQL – Ahmadgeo Mar 08 '14 at 14:10
  • I installed it, that doesnt change anything. I can't start mysql from webmin because it just tries "service mysql start" which isnt going to work. – user1928689 Mar 08 '14 at 14:18
  • Are you sure mariadb is not still installed/running and preventing mysql from claiming its default port? – steeldriver Mar 08 '14 at 14:32
  • checked my entire package list, didn't find anything with mariadb in it's name. Although mysql now installs something from mariadb by default, which confuses me a bit. – user1928689 Mar 08 '14 at 14:35
  • 1
    To close voters, this question has been perfectly on topic at the time it was asked, so I'm voting to leave open. See also https://meta.askubuntu.com/questions/16132/please-dont-flag-old-questions-as-eol – Videonauth Nov 25 '17 at 08:15
  • Unless [Lonnie Best's answer](https://askubuntu.com/a/539199) is the solution--and in this particular case, I am not sure if it is--then I believe Avinash Raj's answer *almost* managed to provide the correct solution, and that it merely didn't advise to remove all the relevant MySQL packages. Even if that is *not* the solution, this problem manifests in the same way as [the one in that question](https://askubuntu.com/q/261250) (see the top answer for why I think removing more packages would have helped). I don't think this is off-topic--not even as *no repro*--but I belive it is a duplicate. – Eliah Kagan Nov 25 '17 at 11:07

2 Answers2

1

Try these commands to completely remove the unconfigured mysql-server-5.5,mysql-server packages,

sudo dpkg -P --force-remove-reinstreq mysql-server-5.5
sudo dpkg -P --force-remove-reinstreq mysql-server

Then install it again by running,

sudo apt-get install mysql-server-5.5
sudo apt-get install mysql-server
Avinash Raj
  • 77,204
  • 56
  • 214
  • 254
1

For me, the reason this happened was that the root partition was full. Check to see how much free space you have on your root partition:

df -h

If you are out of space, see what's taking up that space:

sudo apt-get install ncdu ; sudo ncdu /
Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
Lonnie Best
  • 2,174
  • 2
  • 32
  • 42