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?

6
  • try to install webmin by $wget 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 yourserverip:10000 and from servers part, try to connect to MySQL
    – Ahmadgeo
    Mar 8, 2014 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. Mar 8, 2014 at 14:18
  • Are you sure mariadb is not still installed/running and preventing mysql from claiming its default port? Mar 8, 2014 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. Mar 8, 2014 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 meta.askubuntu.com/questions/16132/…
    – Videonauth
    Nov 25, 2017 at 8:15

2 Answers 2

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
14
  • tried that hours ago. Ends up in same spot "start: Job failed to start" Mar 8, 2014 at 14:12
  • Now try my edit. Mar 8, 2014 at 14:14
  • still the same ;/ Would you have any idea why am i asked 3 times for mysql password?\ Mar 8, 2014 at 14:20
  • post the output of sudo dpkg -P --force-remove-reinstreq mysql-server-5.5. Mar 8, 2014 at 14:22
  • (Reading database ... 352586 files and directories currently installed.) Removing mysql-server-5.5 ... Purging configuration files for mysql-server-5.5 ... dpkg: warning: while removing mysql-server-5.5, directory '/usr/share/doc/mysql-server-5.5' not empty so not removed. Processing triggers for man-db ... Processing triggers for ureadahead ... Mar 8, 2014 at 14:22
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 /

Not the answer you're looking for? Browse other questions tagged .