0
     ┌───────────────────────Configuring mysql-server-5.5─────────────────────────┐
     │ Unable to set password for the MySQL "root" user                           │
     │                                                                            │
     │ An error occurred while setting the password for the MySQL                 │
     │ administrative user. This may have happened because the account already    │
     │ has a password, or because of a communication problem with the MySQL       │
     │ server.                                                                    │
     │                                                                            │ 
     │ You should check the account's password after the package installation.    │
     │                                                                            │ 
     │ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for     │ 
     │ more information.                                                          │ 
     │                                                                            │
     │                                                                            │
     ├────────────────────────────────────────────────────────────────────────────┤ 
                                      │ < OK > │ 
     └────────────────────────────────────────────────────────────────────────────┘
start: Job failed to start 
invoke-rc.d: initscript mysql, action "start" failed. 
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1 
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 package mysql-server (--configure):
 dependency problems - leaving unconfigured 
Processing triggers for libc-bin (2.19-0ubuntu6.6) ... 
Processing triggers for ureadahead (0.100.0-16) ... 
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server 
E: Sub-process /usr/bin/dpkg returned an error code (1)

I issued ps -e | grep mysqld after this but got no output.

I have tried everything below but the problem remains:

dpkg -S etc/mysql
aptitude purge mysql-server --purge-unused
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
sudo dpkg --configure -a
sudo apt-get update 

I tried this as well with no luck:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5 
sudo dpkg -i mysql-5.6.13-debian6.0-i686.deb 
sudo apt-get install mysql-server

How should I proceed?

Fabby
  • 34,259
  • I have the same problem. Upgraded from 14.04.3 to 14.10 with no prob (mysql continuing to work fine). But the upgrade from 14.10 to 15.04 fails with this error at 75% point - installation just freezes. It asked for MySQL root password during install, and I entered the current/14.04 password. But it failed and stopped... – Fred Hamilton Sep 19 '15 at 00:05
  • here my suggestion is to complete remove mysql using dpkg with purge option then trying to install again. – Nullpointer Sep 07 '17 at 06:35

1 Answers1

1

It is difficult to see in what configuration your system really is, with all commands that you tried. Did you read the /usr/share/doc/mysql-server-5.5/README.Debian as suggested in the first part?

Anyway, I would try: sudo dpkg-reconfigure mysql

This will give you a chance to enter a root password for MySQL (not to be confused with linux rootuser.

If successful, to start MySQL: sudo service mysql start