I am trying to install mysql server on ubuntu 14.0.4.

When I ran sudo apt-get install mysql-server php5-mysql I got a message to set root password.

  1. When I did not set a password, it kept asking for password
  2. When I set a password, it mentioned that password has changed.


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
Setting up libhtml-template-perl (2.95-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.4) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I tried the following step but it failed:

root@jdm:/var/run/mysqld# sudo mysql_install_db
Installing MySQL system tables...
160312  2:14:01 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160312  2:14:01 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1) starting as process 21095 ...

Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

root@jdm:/var/run/mysqld# apt-cache policy mysql-server-5.5
  Installed: 5.5.47-0ubuntu0.14.04.1
  Candidate: 5.5.47-0ubuntu0.14.04.1
  Version table:
 *** 5.5.47-0ubuntu0.14.04.1 0

Im not sure why your having this issue but it sounds like a privilege issue with your folders not able to save your setting, I would backup all important files you have and do fresh install because on a fresh install you get to setup all the passwords and complete lamp environment and your done and working in just over an hour. Hope that helps

  • Thanks Vasko, but I tried this & didnt help. Is there some way to find the preconfigured root password & go ahead with the installatin? – Sam Mar 16 '16 at 17:42
  • I think this has been answered here askubuntu.com/questions/642422/… – Vasko Mar 17 '16 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.