I have a website server on Ubuntu server 18.04 with apache and mysql. The database stopped for no apparent reason. I just did a restart of mysql server to solve the issue but after a simple update I got some errors on mysql-server package. The update was for other packages and not mysql-server package. Mysql still stops at least once a week and each time I have to restarts the mysql-server.

Can some one help me to understand the error please ?

Here the result of: dpkg --configure -a

Configure mysql-server-5.7 (5.7.23-0ubuntu0.18.04.1) ... /var/lib/dpkg/info/mysql-server-5.7.postinst: ligne 191: /usr/share/mysql-common/configure-symlinks: no file or folder

dpkg: erreur de traitement du paquet mysql-server-5.7 (--configure) : installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127

  • 1
    Did you enable any third party apt repositories? What's the output of apt-cache policy mysql-common? Aug 5, 2018 at 21:24
  • Thanks Robie, here the outup: mysql-common: Installed : 1:10.2.15+maria~bionic Candidate : 1:10.2.15+maria~bionic Table version : *** 1:10.2.15+maria~bionic 100 100 /var/lib/dpkg/status 5.8+1.0.4 500 500 fr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 500 fr.archive.ubuntu.com/ubuntu bionic/main i386 Packages
    – Zied ALAYA
    Aug 5, 2018 at 21:54

1 Answer 1


Your system is broken because you installed third party packages which collide with the MySQL packages provided with Ubuntu. This is the danger of adding third party repositories: you rely on them to not break your system. It's also difficult to tell you reliably exactly how to fix your system because we don't know exactly what these third parties have done to your system.

Try purging all MySQL and MariaDB related packages, deleting /var/lib/mysql and /etc/mysql, removing all third party apt repositories from /etc/apt/sources.list and /etc/apt/sources.list.d and then reinstalling MySQL from the official Ubuntu repositories again. This will wipe any existing database data that you have.

To get a list of MySQL and MariaDB packages, try something like dpkg -l|egrep mysql\|mariadb. To purge pacakges, using dpkg -P package1 package2 etc. You will need to purge all the relevant packages together to avoid dependency issues.

  • Works for me. Just add these folder to delete folders list rm -R /usr/share/mysql-common/
    – Zied ALAYA
    Aug 8, 2018 at 17:56

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.