3

I tried to reinstall MySQL but I was having problems. Initially I tried to solve the problem by reinstalling GNOME control center, but this didn't work and I am still experiencing problems trying to reinstall MySQL.

I'm unable to reinstall Gnome Control Center by running the following command on the terminal:

sudo apt-get install --reinstall gnome-control-center

I'm getting the following output on the Terminal:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 29 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1718 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 297079 files and directories currently installed.)
Preparing to unpack .../gnome-control-center_1%3a3.36.5-0ubuntu2_amd64.deb ...
Unpacking gnome-control-center (1:3.36.5-0ubuntu2) over (1:3.36.5-0ubuntu2) ...
Setting up mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
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: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Setting up gnome-control-center (1:3.36.5-0ubuntu2) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for mime-support (3.64ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

And the reinstall crashes.

After running:

ls -l /var/crash

I'm getting the following output on the terminal:

total 200

-rw------- 1 root whoopsie 203863 Sep 13 14:11 mysql-server-8.0.0.crash

Also:

sudo apt update

is giving this output:

Ign:1 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic InRelease
Hit:2 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:4 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]         
Hit:6 http://ppa.launchpad.net/mkusb/ppa/ubuntu bionic InRelease              
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease
Get:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:9 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1096 B]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [27.7 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [61.0 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2468 B]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [282 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 48x48 Icons [60.5 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [351 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Fetched 1017 kB in 2s (665 kB/s)    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
30 packages can be upgraded. Run 'apt list --upgradable' to see them.

And sudo apt upgrade is giving this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  firefox firefox-locale-de firefox-locale-en firefox-locale-es firefox-locale-fr firefox-locale-he firefox-locale-it firefox-locale-pt
  firefox-locale-ru firefox-locale-zh-hans ghostscript ghostscript-x google-chrome-stable libapache2-mod-php7.4 libgs9 libgs9-common php7.4
  php7.4-bz2 php7.4-cli php7.4-common php7.4-curl php7.4-gd php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml
  php7.4-zip wireless-regdb
30 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
15 standard security updates
Need to get 154 MB of archives.
After this operation, 581 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 93.0.4577.82-1 [82.9 MB]
Get:2 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox amd64 92.0+build3-0ubuntu0.20.04.1 [57.3 MB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 php7.4-zip amd64 7.4.3-4ubuntu2.6 [21.6 kB]                
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 php7.4-mbstring amd64 7.4.3-4ubuntu2.6 [397 kB]            
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 php7.4-bz2 amd64 7.4.3-4ubuntu2.6 [10.4 kB]    
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-xml amd64 7.4.3-4ubuntu2.6 [97.2 kB]      
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-readline amd64 7.4.3-4ubuntu2.6 [12.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-opcache amd64 7.4.3-4ubuntu2.6 [198 kB]        
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-mysql amd64 7.4.3-4ubuntu2.6 [121 kB]       
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-json amd64 7.4.3-4ubuntu2.6 [19.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-gd amd64 7.4.3-4ubuntu2.6 [27.9 kB]       
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-curl amd64 7.4.3-4ubuntu2.6 [31.0 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libapache2-mod-php7.4 amd64 7.4.3-4ubuntu2.6 [1364 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-cli amd64 7.4.3-4ubuntu2.6 [1420 kB]                 
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-common amd64 7.4.3-4ubuntu2.6 [980 kB] 
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4 all 7.4.3-4ubuntu2.6 [9236 B]                
Get:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-de amd64 92.0+build3-0ubuntu0.20.04.1 [492 kB]                     
Get:18 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-en amd64 92.0+build3-0ubuntu0.20.04.1 [686 kB]                     
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-es amd64 92.0+build3-0ubuntu0.20.04.1 [1787 kB]                    
Get:20 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-fr amd64 92.0+build3-0ubuntu0.20.04.1 [495 kB]                     
Get:21 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-he amd64 92.0+build3-0ubuntu0.20.04.1 [489 kB]                     
Get:22 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-it amd64 92.0+build3-0ubuntu0.20.04.1 [397 kB]                     
Get:23 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-pt amd64 92.0+build3-0ubuntu0.20.04.1 [927 kB]                     
Get:24 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-ru amd64 92.0+build3-0ubuntu0.20.04.1 [559 kB]                     
Get:25 http://security.ubuntu.com/ubuntu focal-security/main amd64 firefox-locale-zh-hans amd64 92.0+build3-0ubuntu0.20.04.1 [502 kB]                
Get:26 http://security.ubuntu.com/ubuntu focal-security/main amd64 ghostscript-x amd64 9.50~dfsg-5ubuntu4.3 [43.9 kB]                                
Get:27 http://security.ubuntu.com/ubuntu focal-security/main amd64 ghostscript amd64 9.50~dfsg-5ubuntu4.3 [51.8 kB]                                  
Get:28 http://security.ubuntu.com/ubuntu focal-security/main amd64 libgs9 amd64 9.50~dfsg-5ubuntu4.3 [2172 kB]                                       
Get:29 http://security.ubuntu.com/ubuntu focal-security/main amd64 libgs9-common all 9.50~dfsg-5ubuntu4.3 [681 kB]                                   
Get:30 http://security.ubuntu.com/ubuntu focal-security/main amd64 wireless-regdb all 2021.08.28-0ubuntu1~20.04.1 [10.0 kB]                          
Fetched 154 MB in 23s (6768 kB/s)                                                                                                                    
(Reading database ... 297079 files and directories currently installed.)
Preparing to unpack .../00-google-chrome-stable_93.0.4577.82-1_amd64.deb ...
Unpacking google-chrome-stable (93.0.4577.82-1) over (93.0.4577.63-1) ...
Preparing to unpack .../01-firefox_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../02-firefox-locale-de_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-de (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../03-firefox-locale-en_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-en (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../04-firefox-locale-es_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-es (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../05-firefox-locale-fr_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-fr (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../06-firefox-locale-he_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-he (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../07-firefox-locale-it_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-it (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../08-firefox-locale-pt_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-pt (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../09-firefox-locale-ru_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-ru (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../10-firefox-locale-zh-hans_92.0+build3-0ubuntu0.20.04.1_amd64.deb ...
Unpacking firefox-locale-zh-hans (92.0+build3-0ubuntu0.20.04.1) over (91.0.2+build1-0ubuntu0.20.04.1) ...
Preparing to unpack .../11-ghostscript-x_9.50~dfsg-5ubuntu4.3_amd64.deb ...
Unpacking ghostscript-x (9.50~dfsg-5ubuntu4.3) over (9.50~dfsg-5ubuntu4.2) ...
Preparing to unpack .../12-ghostscript_9.50~dfsg-5ubuntu4.3_amd64.deb ...
Unpacking ghostscript (9.50~dfsg-5ubuntu4.3) over (9.50~dfsg-5ubuntu4.2) ...
Preparing to unpack .../13-libgs9_9.50~dfsg-5ubuntu4.3_amd64.deb ...
Unpacking libgs9:amd64 (9.50~dfsg-5ubuntu4.3) over (9.50~dfsg-5ubuntu4.2) ...
Preparing to unpack .../14-libgs9-common_9.50~dfsg-5ubuntu4.3_all.deb ...
Unpacking libgs9-common (9.50~dfsg-5ubuntu4.3) over (9.50~dfsg-5ubuntu4.2) ...
Preparing to unpack .../15-php7.4-zip_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-zip (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../16-php7.4-mbstring_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-mbstring (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../17-php7.4-bz2_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-bz2 (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../18-php7.4-xml_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-xml (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../19-php7.4-readline_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-readline (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../20-php7.4-opcache_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-opcache (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../21-php7.4-mysql_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-mysql (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../22-php7.4-json_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-json (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../23-php7.4-gd_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-gd (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../24-php7.4-curl_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-curl (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../25-libapache2-mod-php7.4_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking libapache2-mod-php7.4 (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../26-php7.4-cli_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-cli (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../27-php7.4-common_7.4.3-4ubuntu2.6_amd64.deb ...
Unpacking php7.4-common (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../28-php7.4_7.4.3-4ubuntu2.6_all.deb ...
Unpacking php7.4 (7.4.3-4ubuntu2.6) over (7.4.3-4ubuntu2.5) ...
Preparing to unpack .../29-wireless-regdb_2021.08.28-0ubuntu1~20.04.1_all.deb ...
Unpacking wireless-regdb (2021.08.28-0ubuntu1~20.04.1) over (2021.07.14-0ubuntu1~20.04.1) ...
Setting up libgs9-common (9.50~dfsg-5ubuntu4.3) ...
Setting up firefox-locale-fr (92.0+build3-0ubuntu0.20.04.1) ...
Setting up mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
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: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Setting up firefox-locale-ru (92.0+build3-0ubuntu0.20.04.1) ...
Setting up google-chrome-stable (93.0.4577.82-1) ...
Setting up php7.4-common (7.4.3-4ubuntu2.6) ...
Setting up libgs9:amd64 (9.50~dfsg-5ubuntu4.3) ...
Setting up php7.4-curl (7.4.3-4ubuntu2.6) ...
Setting up php7.4-mysql (7.4.3-4ubuntu2.6) ...
Setting up firefox (92.0+build3-0ubuntu0.20.04.1) ...
Please restart all running instances of firefox, or you will experience problems.
Setting up wireless-regdb (2021.08.28-0ubuntu1~20.04.1) ...
Setting up php7.4-readline (7.4.3-4ubuntu2.6) ...
Setting up php7.4-mbstring (7.4.3-4ubuntu2.6) ...
Setting up php7.4-bz2 (7.4.3-4ubuntu2.6) ...
Setting up ghostscript (9.50~dfsg-5ubuntu4.3) ...
Setting up php7.4-zip (7.4.3-4ubuntu2.6) ...
Setting up firefox-locale-en (92.0+build3-0ubuntu0.20.04.1) ...
Setting up firefox-locale-es (92.0+build3-0ubuntu0.20.04.1) ...
Setting up firefox-locale-pt (92.0+build3-0ubuntu0.20.04.1) ...
Setting up php7.4-opcache (7.4.3-4ubuntu2.6) ...
Setting up firefox-locale-zh-hans (92.0+build3-0ubuntu0.20.04.1) ...
Setting up firefox-locale-he (92.0+build3-0ubuntu0.20.04.1) ...
Setting up firefox-locale-de (92.0+build3-0ubuntu0.20.04.1) ...
Setting up php7.4-gd (7.4.3-4ubuntu2.6) ...
Setting up firefox-locale-it (92.0+build3-0ubuntu0.20.04.1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up php7.4-json (7.4.3-4ubuntu2.6) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up php7.4-xml (7.4.3-4ubuntu2.6) ...
Setting up ghostscript-x (9.50~dfsg-5ubuntu4.3) ...
Setting up php7.4-cli (7.4.3-4ubuntu2.6) ...
Setting up libapache2-mod-php7.4 (7.4.3-4ubuntu2.6) ...
libapache2-mod-php7.4: not switching MPM - already enabled
Setting up php7.4 (7.4.3-4ubuntu2.6) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.6) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.6) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be appreciated.

EDIT:

As per a request for additional information, I ran

dpkg-query -l mysql-server-8.0

and received following output:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version                 Architecture Description
+++-================-=======================-============-========================================================
iF  mysql-server-8.0 8.0.26-0ubuntu0.20.04.2 amd64        MySQL database server binaries and system database setup

Also, as per a request for additional information (2), I ran

ls -l /etc/mysql/conf.d/

and received following output:

total 8
-rw-r--r-- 1 root root  8 Aug  3  2016 mysql.cnf
-rw-r--r-- 1 root root 55 Aug  3  2016 mysqldump.cnf

Also, as per a request for additional information (3), I ran

ls -l /etc/mysql/

and received following output:

total 24
drwxr-xr-x 2 root root 4096 Sep 15 18:50 conf.d
-rwxr-xr-x 1 root root  120 Jul 22 07:53 debian-start
-rw------- 1 root root  317 Sep 16 13:45 debian.cnf.bak
lrwxrwxrwx 1 root root   24 Sep 16 14:13 my.cnf -> /etc/alternatives/my.cnf
lrwxrwxrwx 1 root root   24 Sep 15 18:50 my.cnf.bak -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root  839 Aug  3  2016 my.cnf.fallback
-rw-r--r-- 1 root root  682 Nov  6  2019 mysql.cnf
drwxr-xr-x 2 root root 4096 Sep 16 14:26 mysql.conf.d
29
  • 2
    Why were you reinstalling the software? Could this be an XY Problem? Please edit your question and include more context so that we can understand the root problem.
    – Nmath
    Sep 13 at 18:36
  • @Nmath, because it desappeared after unsuccesfull reinstall of MySQL. Now I can access Gnome Control Center from the terminal, but not from the icons on the top right corner.
    – BlueSkies
    Sep 13 at 18:44
  • 1
    Problems may have originated because you were performing apt commands when your system was not up-to-date and your list of packages was not up-to-date. This can cause dependency problems. Your edit shows that your package management system is in bad shape. I'm not sure what GNOME control center has to do with anything. Let's investigate the issues with your package management. Please edit your question and include the outputs of sudo apt update, then sudo apt upgrade. You can choose "NO" on the upgrade command if problems are noted, otherwise, take care of that maintenance task.
    – Nmath
    Sep 13 at 20:42
  • @Nmath, sudo apt update and sudo apt upgrade executed and the outputs inserted in the body of my question.
    – BlueSkies
    Sep 13 at 21:03
  • 1
    So far these are just (good) guesses. Please post the output from the command dpkg-query -l mysql-server-8.0 and we will most likely all be able to answer. I have posted an answer, but if you can post the requested output and flag me, it will be less "if this, go here.." and more of a single cohesive answer. Until then we will do the best we can with what we are given. XD
    – Nate T
    Sep 19 at 4:30
1
+50

~ EDIT ~

Judging by the following lines from your posted output:

mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured

I am pretty sure you just need to run

sudo apt install mysql-server-8.0

as I said (say?) below, there are 2 nearly identically named packages, so I can see it being an easy oversight. Not sure why it didn't just grab the dependencies to begin with, but regardless, the command above should fix.

~ Tl;dr: ~

I have listed 2 fixes in the bottom section below. You can go ahead and try the first, as it is likely what you need, but wait until I have seen the output I have requested before moving to the second.


There are 2 different Apt packages, both in the same repository (focal proposed), for mysql 8.0. One is named and versioned as follows:

mysql-server/focal-proposed,focal-proposed 8.0.26-0ubuntu0.20.04.3 all

and the other:

mysql-server-8.0/focal-proposed 8.0.26-0ubuntu0.20.04.3 amd64

do you have both?

Run the dpkg-query command below for both, just to be sure.


Fix at the bottom.


NOTE:

The next section describes how to determine the issue for sure, but the fix, written at the bottom of this post, will be the same in any case. It is up to you whether or not you want to follow through or skip ahead.


~ PINPOINTING THE CAUSE ~

From what it says, you need them both. The second one is architecture dependent, and the other is for any Ubuntu Desktop system.

The next step for you depends on the result you get from running the following command:

dpkg-query -l mysql-server-8.0

The character codes in the output represent the status, along with other info.

If it shows as not installed, it is because you have a different version of mysql. Also, notice how the version number is part of the package name for the offending version? That is because in this package, MySQL 8.0 is NOT an update from the older versions. Therefore, you cannot just update it with apt upgrade. Whoever maintains MySQL decided to release it as a completely separate package, so updating to this from the older mysql-server-xxx package would be like upgrading from postgres to MySQL... Impossible.

If it is showing somewhere between not installed and installed it is a 1-command fix, but we really need to know how far along it got in the installation process to know the most efficient fix. The command above should provide this.

Although the second method below should fix regardless, there are better ways. That was put last for a reason. It is the catch-all method for if better methods do not prove fruitful. Also, if the first command in the solution section is not run first, the last one may give an error.

~ ANSWER ~

First, you can try configuring / reconfiguring. You have 2 packages on your system that need this hopefully at least 1 is a mysql-server package. The command to configure all packages that need it is:

dpkg --configure --pending

If configuring does not work, the best way to work around this issue is to remove your old package and then install mysql-server and mysql-server-8.0 fresh. This should keep your configuration files and all other writes (i.e. your databases) intact, as long as you do not use the --purge option! Using this will remove it all!

If you have to do this, google first to find someone else who has already done so. It is up to the pkg developer to list dependencies, and the wrong mistake in that configuration can lead to big problems. It is rare, but still worth the 1-2 minutes it takes to google the phrase apt remove mysql.

The command to remove and reinstall is:

sudo apt remove mysql-server-8.0 && sudo apt install 
1
  • I ran dpkg-query -l mysql-server-8.0. What other command should I run?
    – BlueSkies
    Sep 19 at 14:18
1

I'm more curious about this error message:

Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
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: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
  1. Let go first fix the half installed package:

    sudo mv /var/lib/dpkg/info/mysql-server-8.0.postinst /var/lib/dpkg/info/mysql-server-8.0.postinst.backup
    sudo apt -f install
    sudo mv /var/lib/dpkg/info/mysql-server-8.0.postinst.backup /var/lib/dpkg/info/mysql-server-8.0.postinst
    
  2. Check again if mysql server reboots fine:

    sudo service mysql restart
    
3
  • What are the sudo mv commands supposed to do?
    – BlueSkies
    Sep 22 at 18:04
  • @BlueSkies to disable the post-install script of mysql-server-8.0 package
    – user.dz
    Sep 22 at 18:27
  • ls /var/lib/dpkg/info/mysql-server-8.0.postinst is outputting ls: cannot access '/var/lib/dpkg/info/mysql-server-8.0.postinst': No such file or directory
    – BlueSkies
    Sep 22 at 22:12
-1

An error most likely comes from a broken package. I would try something like this:

sudo dpkg --remove --force-remove-reinstreq mysql-server && sudo apt-get clean && sudo apt-get autoremove && sudo apt-get update --fix-missing && sudo apt-get update

Afterwards try to re-install gnome-control-center (or mysql-server) and everything hopefully should work.

4
  • 2
    it seems like gnome-control-center is not the problem at all
    – Zanna
    Sep 18 at 18:19
  • @Zanna, it seems to me that the gnome-control-center problem is related to MySQL problem. Apparently gnome-control-center needs MySQL, which -- for whatever reason -- is not set correctly.
    – BlueSkies
    Sep 18 at 19:38
  • @BlueSkies gnome-control-center doesn't need MySQL (it would be very very strange if it did - see apt depends gnome-control-center for proof) (and neither does MySQL need gnome-control-center) - the problem is that when apt has a problem with some package it refuses to do anything else. Note that you can't install any package in this situation without encountering the same error. What you probably need to do here is to purge MySQL packages - ignore gnome-control-center.
    – Zanna
    Sep 19 at 3:43
  • I see. Well, I guess mysql-server is the culput here. Please try running sudo dpkg --remove --force-remove-reinstreq mysql-server && sudo apt-get clean && sudo apt-get autoremove && sudo apt-get update --fix-missing && sudo apt-get update. Sep 20 at 7: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.