6

I am having a error whilst installing MySQL 5.6 from downloaded deb and from apt:

nginx@LBNginx:/tmp$ sudo dpkg -i mysql-server-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb
(Reading database ... 121037 files and directories currently installed.)
Preparing to unpack mysql-server-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) over (5.6.27-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) ...
2015-10-27 19:31:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-10-27 19:31:17 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27-0ubuntu0.14.04.1) starting as process 7666 ...
2015-10-27 19:31:17 7666 [Note] Plugin 'FEDERATED' is disabled.
2015-10-27 19:31:17 7666 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-27 19:31:17 7666 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-27 19:31:17 7666 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-27 19:31:17 7666 [Note] InnoDB: Memory barrier is not used
2015-10-27 19:31:17 7666 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-10-27 19:31:17 7666 [Note] InnoDB: Using Linux native AIO
2015-10-27 19:31:17 7666 [Note] InnoDB: Not using CPU crc32 instructions
2015-10-27 19:31:17 7666 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-27 19:31:17 7666 [Note] InnoDB: Completed initialization of buffer pool
2015-10-27 19:31:17 7666 [Note] InnoDB: Highest supported file format is Barracuda.
2015-10-27 19:31:17 7666 [Note] InnoDB: 128 rollback segment(s) are active.
2015-10-27 19:31:17 7666 [Note] InnoDB: Waiting for purge to start
2015-10-27 19:31:17 7666 [Note] InnoDB: 5.6.27 started; log sequence number 1626007
2015-10-27 19:31:17 7666 [Note] Binlog end
2015-10-27 19:31:17 7666 [Note] InnoDB: FTS optimize thread exiting.
2015-10-27 19:31:17 7666 [Note] InnoDB: Starting shutdown...
2015-10-27 19:31:19 7666 [Note] InnoDB: Shutdown completed; log sequence number 1626017
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.6 (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mysql-server-5.6

I have completely removed MySQL from the system and tried again but still no avail.

Note: I am running Ubuntu Server Trusty

4 Answers 4

8

first remove mysql-server completely using commands:

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

then try to install it again.

sudo apt-get install mysql-server

if you installing with dpkg command and if it show any dependency on other package then run command :

sudo apt-get install -f 

then try again to install

EDIT: Here is bug with mysql-server-5.6 so try lower version of mysql-server. if you want to install mysql-server-5.6 then you can use this PPA.

create any file under /etc/apt/sources.list.d/

sudo vi /etc/apt/sources.list.d/mysql.list

and paste below lines and save it.

deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu trusty main 
deb-src http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu trusty main 

and update it

sudo apt-get update 

then install it using command

sudo apt-get install mysql-server-5.6

it is tested on Ubuntu 14.04 . Here is PPA available for Ubuntu Version 12.04 ,14.04 ,14.10, 15.04 and 15.10.

7
  • It ends up with the same error.
    – meun5
    Oct 28, 2015 at 1:46
  • after removing completely . these file are available . /etc/mysql/ and /var/lib/mysql/ if yes then remove it using command sudo rm -r /etc/mysql/
    – pl_rock
    Oct 28, 2015 at 1:56
  • I end up with ` start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. Package mysql-server-5.6 is not configured yet. dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: mysql-server-5.6 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) `
    – meun5
    Oct 28, 2015 at 1:58
  • reinstall apt-get --reinstall install bsdutils . reference askubuntu.com/questions/506243/…
    – pl_rock
    Oct 28, 2015 at 2:04
  • bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1435081 here is bug with mysql-server 5.6 so try with lower version
    – pl_rock
    Oct 28, 2015 at 2:11
1

I got same issue when I followed following tutorial to install mysql 5.6 on ubuntu 14.

I had installed Ubuntu using vagrant. I had assigned only 512 MB to the virtual machine.

To fix it I did following things.

1) Increased the virtual machine Memory to 1024MB

config.vm.provider "virtualbox" do |vb| # # Display the VirtualBox GUI when booting the machine # vb.gui = true # # # Customize the amount of memory on the VM: vb.memory = "1024" end

2) Run vagrant reload command

3) Then uninstalled the MySql

sudo apt-get remove mysql-server mysql-client
sudo apt-get install mysql-server-5.6 mysql-client-5.6

4) Then again installed MySql and it worked for me.

1
  • I have same problem. Because Memory defaul is 512MB. Because of something it is didn't work
    – Sơn Lâm
    Sep 15, 2017 at 9:01
0

Seems like a problem with mysql-common, you need to use mysql-common 5.5.46-0ubuntu0.14.04.2 for mysql-server-5.6_5.6.27

After you executed

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

try with this https://gist.github.com/dranes/e65bbaa8c7800fd12575

0

Atlast this worked for me

sudo apt-get install -f mysql-server

I added -f in the command, after removing mysql completely. That did the trick!

You must log in to answer this question.

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