I tried running mysql after upgrading to 20.04, but it couldnt, so I tried removing it, but everytime i try to use the package, wherever is removing or purging, i always stumble into this:

lsudo apt purge  mysql-server
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Il pacchetto "mysql-server" non è installato e quindi non è stato rimosso
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
1 non completamente installati o rimossi.
Dopo quest'operazione, verranno occupati 0 B di spazio su disco.
Configurazione di mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1)...
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
2021-02-24T17:09:52.048092Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Err
_SUBSTITUTION' to 'sql_mode'.
2021-02-24T17:09:52.049668Z 0 [ERROR] [MY-010119] [Server] Aborting
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing
 common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: errore nell'elaborare il pacchetto mysql-server-8.0 (--configure):
 il sottoprocesso installato pacchetto mysql-server-8.0 script post-installation
 ha restituito lo stato di errore 1
Si sono verificati degli errori nell'elaborazione:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried including those values to sql-mode in the my.cnf file, but it won't work.

Please, help!

  • Seems packages have been corrupted or broken. Try configure dpkg by running following command sudo dpkg ––configure –a – Emil Feb 24 at 17:31

To solve the following error:

dpkg: Error processing mysql-server-8.0 (--configure) package:
 the thread installed mysql-server-8.0 script post-installation package
 returned error status 1
There were errors in processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Create a /var/lib/dpkg/info/mysql-server-8.0.postrm with the following content:


Then run:

sudo dpkg --configure -a
sudo apt update
sudo apt upgrade

I would suggest using synaptic package manager. If you do not have it installed use this guide:


Then, once you have it installed, you can fix/delete/reinstall the file by searching for the mysql package.

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.