ajib
ajib

Reputation: 309

MySQL Won't Install on Ubuntu 11.04

It was working fine before and I was configuring the email server when I restarted the mysql (via /etc/init.d/mysql restart). I'm pretty sure that I did not touch anything in there but I can remember doing a failed apt-get update prior to that.

Now my problem starts when all of a sudden it stops and won't even start. I searched on google and even went far to purging everything and doing a new install. But still it won't let me install mysql properly.

I've tried (after doing a remove --purge):

sudo apt-get install mysql-server-5.5 mysql-client-5.5

and it prompts me for a root passsword, but returns me the following error:

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. 

and I have the following logs too:

Selecting previously deselected package mysql-server-5.5.
(Reading database ... 117879 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) ...
130830 14:13:26 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
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
E: Sub-process /usr/bin/dpkg returned an error code (1)

any help? Thanks in advance.

Upvotes: 1

Views: 3899

Answers (2)

Nihser
Nihser

Reputation: 31

I experienced this problem. maybe aptitude have some config for package. I think this problem of interference Although, this method is purge command . try running.

  1. check installed mysql package

    dpkg --get-selections|grep mysql

  2. remove

    apt-get remove --purge [installed package]
    apt-get autoremove
    apt-get autoclean
    aptitude purge [installed package]
    aptitude clean
    aptitude update
    aptitude -f install
    aptitude full-upgrade

  3. install

    apt-get install mysql-server

Upvotes: 2

Mostafa Hussein
Mostafa Hussein

Reputation: 11940

this question was having the same issue it solved by uninstalling but before that he tried to set the password that is the question and then he tried to solve it in chat maybe when you try to set a password it will be solved , just try

Update: Type the following commands in your terminal in order to make a complete remove for mysql.

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

Also you need to remove the /var/lib/mysql folder if exist by typing the following command

sudo rm -rf /var/lib/mysql

Then follow the official ubuntu documentation to install. and don't forget to set your mysql password during installation.

Also see this question its similar to the error you have got during the installation process.

Upvotes: 2

Related Questions