Bug #102081 MySQL From APT Wont Install On Fresh Debian 10
Submitted: 29 Dec 2020 9:14 Modified: 30 Dec 2020 11:49
Reporter: Jeffery Wilkins Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Package Repos Severity:S1 (Critical)
Version:5.7 OS:Debian (GNU/Linux 10 (buster))
Assigned to: CPU Architecture:x86

[29 Dec 2020 9:14] Jeffery Wilkins
Description:
root@server:/tmp# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  mecab-ipadic mecab-ipadic-utf8 mecab-utils
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  mysql-community-server
The following NEW packages will be installed:
  mysql-community-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/36.1 MB of archives.
After this operation, 217 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
(Reading database ... 182360 files and directories currently installed.)
Preparing to unpack .../mysql-community-server_5.7.32-1debian10_amd64.deb ...
install: invalid user ‘mysql’
dpkg: error processing archive /var/cache/apt/archives/mysql-community-server_5.7.32-1debian10_amd64.deb (--unpack):
 new mysql-community-server package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-community-server_5.7.32-1debian10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How to repeat:
see description
[29 Dec 2020 10:12] Jeffery Wilkins
updated catagory
[29 Dec 2020 20:19] MySQL Verification Team
Thank you for the bug report. I couldn't repeat:
miguel@pochita:~/Downloads$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

miguel@pochita:~/Downloads$ sudo dpkg -i mysql-apt-config_0.8.16-1_all.deb
[sudo] password for miguel:
Selecting previously unselected package mysql-apt-config.
(Reading database ... 306334 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.16-1_all.deb ...
Unpacking mysql-apt-config (0.8.16-1) ...
Setting up mysql-apt-config (0.8.16-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK
miguel@pochita:~/Downloads$ sudo apt update
Get:1 http://repo.mysql.com/apt/debian buster InRelease [21.5 kB]
Get:2 http://repo.mysql.com/apt/debian buster/mysql-5.7 Sources [910 B]
Get:3 http://repo.mysql.com/apt/debian buster/mysql-apt-config amd64 Packages [566 B]
Get:4 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 Packages [5,685 B]
Get:5 http://repo.mysql.com/apt/debian buster/mysql-tools amd64 Packages [5,210 B]
Hit:6 http://security.debian.org/debian-security buster/updates InRelease
Hit:7 http://mirror.unesp.br/debian buster InRelease
Hit:8 http://mirror.unesp.br/debian buster-updates InRelease
Fetched 33.9 kB in 10s (3,295 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
miguel@pochita:~/Downloads$ sudo apt install mysql-community-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libaio1 libmecab2 mysql-client mysql-community-client
The following NEW packages will be installed:
  libaio1 libmecab2 mysql-client mysql-community-client mysql-community-server
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.8 MB of archives.
After this operation, 311 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirror.unesp.br/debian buster/main amd64 libaio1 amd64 0.3.112-3 [11.2 kB]
Get:2 http://mirror.unesp.br/debian buster/main amd64 libmecab2 amd64 0.996-6 [258 kB]
Get:3 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-community-client amd64 5.7.32-1debian10 [14.4 MB]
Get:4 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-client amd64 5.7.32-1debian10 [67.2 kB]
Get:5 http://repo.mysql.com/apt/debian buster/mysql-5.7 amd64 mysql-community-server amd64 5.7.32-1debian10 [36.1 MB]
Fetched 50.8 MB in 7s (6,807 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libaio1:amd64.
(Reading database ... 306339 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.112-3_amd64.deb ...
Unpacking libaio1:amd64 (0.3.112-3) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-community-client (5.7.32-1debian10) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-client (5.7.32-1debian10) ...
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack .../libmecab2_0.996-6_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-6) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../mysql-community-server_5.7.32-1debian10_amd64.deb ...
Unpacking mysql-community-server (5.7.32-1debian10) ...
Setting up libmecab2:amd64 (0.996-6) ...
Setting up libaio1:amd64 (0.3.112-3) ...
Setting up mysql-community-client (5.7.32-1debian10) ...
Setting up mysql-client (5.7.32-1debian10) ...
Setting up mysql-community-server (5.7.32-1debian10) ...
2020-12-29T20:14:48.615357Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-12-29T20:14:48.833746Z 0 [Warning] InnoDB: New log files created, LSN=45790
2020-12-29T20:14:48.880060Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2020-12-29T20:14:48.948712Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 806deeca-4a12-11eb-a702-080027bd4ef3.
2020-12-29T20:14:48.950809Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-12-29T20:14:49.494101Z 0 [Warning] CA certificate ca.pem is self signed.
2020-12-29T20:14:49.667301Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Processing triggers for systemd (241-7~deb10u5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
miguel@pochita:~/Downloads$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.32 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
[30 Dec 2020 0:49] Jeffery Wilkins
not sure why this worked for you and not for me this is a brand new install of debian 10

root@server:/var/cache/apt/archives# sha1sum mysql-community-server_5.7.32-1debian10_amd64.deb
958a8ca37a04b2f363b4a080fe907deb366a8106  mysql-community-server_5.7.32-1debian10_amd64.deb

here is the sha1sum of my deb file
[30 Dec 2020 11:49] Jeffery Wilkins
solved by adding the mysql user by hand into /etc/passwd

mysql:x:114:121:MySQL Server,,,:/var/lib/mysql:/bin/false

for some reason apt forgot to do this part on my system maybe because I had some conflicts with debians mariadb