Ubuntu update stops while configuring mysql-server-5.7

When I update my Ubuntu sofwares and applications using Software Updater in Ubuntu 16.04 LTS, the update stops while Configuring mysql-server-5.7(when the downloaded updates are being installed). And in the Details, I get this message :

   Setting up mysql-server-5.7 (5.7.12-0ubuntu1.1) ...
   locale: Cannot set LC_CTYPE to default locale: No such file or directory 
   locale: Cannot set LC_MESSAGES to default locale: No such file or directory
   locale: Cannot set LC_ALL to default locale: No such file or directory
   insserv: warning: current start runlevel(s) (empty) of script 'mysql' overrides LSB defaults (2 3 4 5).
   insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script 'mysql' overrides LSB defaults (0 1 6).

Please suggest a method to get rid of this problem.


Solution 1:

The problem is that during the mysql-server configure process, the mysql service is restarted. Check that you have mysql service enabled else mysql will not restart and the configuration process fails:

  • Execute

    sudo update-rc.d mysql enable
    
  • Comment 'manual' if present in mysql.override

    sudo vi /etc/init/mysql.override