3

I'm trying to bug test a database issue with a website I'm working on. I would like to see if switching between mariadb and MySQL fixes the issue (however unlikely that is). I thought this would be a simple processes on a dev machine (I don't have any data to worry about / back up).

I used the command

sudo apt-get purge mariadb*

and then I entered

sudo apt-get install mysql-server

And was surprised to receive this lovely error.

   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
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
Setting up libmariadbclient18 (5.5.32+maria-1~precise) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried dkpg --configure -a and was greeted with this

Setting up mysql-server-5.5 (5.5.31-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
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
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

I noticed that there wasa line which said

setting up libmariadbclient18

which makes no sense to me since I purged mariadb* earlier. Anyone out there have an idea of what's going on?

Update I went right to the heart of the issue and did

sudo apt-get install mysql-client-5.5

and was greeted with

Note, selecting 'mariadb-client-5.5' instead of 'mysql-client-5.1'

Not sure what's going on.

update2

sudo apt-get purge libmariadbclient-dev

has me installing the correct client, still getting an error on install.

AlexLordThorsen
  • 147
  • 1
  • 6

2 Answers2

2

You forgot to remove the libmariadbclient18 package. Remove that first.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • I did apt-get purge libmariadbclient18. went to install and saw this message. `The following NEW packages will be installed: libdbd-mysql-perl libmariadbclient18 libmysqlclient18 mysql-client-5.5 mysql-server mysql-server-5.5` So it's not because I haven't uninstalled it. for some reason apt-get is installing mariadb's client. – AlexLordThorsen Jul 24 '13 at 19:37
  • So I found the reason why my client was installing mariadb's client. `sudo apt-get purge libmariadbclient-dev` made it so mysql-server installs the correct client. It does not, however, fix my error. – AlexLordThorsen Jul 24 '13 at 20:23
0

If you can uninstall mysql-server and just delete ALL DATABASES, you can try this (again, be sure you have a working backup of all your databases):

rm -rf /var/lib/mysql

and then reinstall mysql-server.

Antonio
  • 1
  • 1