Install of MySQL hangs on Ubuntu 16.04

15,826

Solution 1

Same problem, found fix at https://omgdebugging.com/2016/09/04/fixing-hung-up-mysql-installation-on-ubuntu-16-04-lts/. I ran (as root) (sleep 200; killall mysqld)& then immediately apt-get install -y mysql-server mysql-client in my provisioning script.

Solution 2

After purging, check your /var/lib/mysql directory if it contains any files, and move those to other place or delete before trying to re-install.

Share:
15,826

Related videos on Youtube

panthro
Author by

panthro

Updated on September 18, 2022

Comments

  • panthro
    panthro over 1 year

    I’m trying to install MySQL server on Ubuntu 16.04 using:

    sudo apt-get install mysql-server
    

    I get asked to set and confirm root password and then the install hangs at:

    Renaming removed key_buffer and myisam-recover options (if present)
    

    I’ve exited the install and purged MySQL and tried again, but the issue persists.

  • panthro
    panthro over 7 years
    Thanks, I delete the files under /var/lib/mysql after a purge, still hangs on Renaming removed key_buffer and myisam-recover options (if present)
  • Tisch
    Tisch about 7 years
    I ran: "killall mysqld" instead of the command mentioned here, then reinstalled, this worked for me.
  • Maykonn
    Maykonn almost 7 years
    Thanks!!!! This is the unique way that I found in my searches to fix it.