Unable to install mysql in toolbox

Hi, I have been trying to install mysql in toolbox on Fedora Silverblue 38, but it seems that it does not work well. Here is the output.

$ sudo dnf install community-mysql-server -y
Last metadata expiration check: 0:03:52 ago on Mon 24 Apr 2023 08:43:09 PM.
Dependencies resolved.
...
Install  33 Packages

Total download size: 45 M
Installed size: 262 M
Downloading Packages:
(1/33): community-mysql-common-8.0.32-1.fc38.x8  19 kB/s |  77 kB     00:04    
(2/33): checkpolicy-3.5-1.fc38.x86_64.rpm        64 kB/s | 349 kB     00:05    
(3/33): community-mysql-errmsg-8.0.32-1.fc38.x8 147 kB/s | 493 kB     00:03    
(4/33): cryptsetup-libs-2.6.1-1.fc38.x86_64.rpm 207 kB/s | 492 kB     00:02    
(5/33): device-mapper-1.02.189-2.fc38.x86_64.rp 109 kB/s | 139 kB     00:01    
(6/33): device-mapper-libs-1.02.189-2.fc38.x86_ 144 kB/s | 176 kB     00:01    
(7/33): community-mysql-8.0.32-1.fc38.x86_64.rp 251 kB/s | 3.1 MB     00:12    
(8/33): kmod-libs-30-4.fc38.x86_64.rpm          199 kB/s |  68 kB     00:00    
(9/33): libaio-0.3.111-15.fc38.x86_64.rpm        40 kB/s |  23 kB     00:00    
(10/33): libargon2-20190702-2.fc38.x86_64.rpm    51 kB/s |  28 kB     00:00    
(11/33): libseccomp-2.5.3-4.fc38.x86_64.rpm      75 kB/s |  71 kB     00:00    
(12/33): libselinux-utils-3.5-1.fc38.x86_64.rpm 131 kB/s | 160 kB     00:01    
(13/33): libxkbcommon-1.5.0-2.fc38.x86_64.rpm   159 kB/s | 140 kB     00:00    
(14/33): mariadb-connector-c-config-3.2.7-3.fc3 6.7 kB/s | 8.7 kB     00:01    
(15/33): mecab-0.996-3.fc38.5.x86_64.rpm        187 kB/s | 355 kB     00:01    
(16/33): numactl-libs-2.0.16-2.fc38.x86_64.rpm   20 kB/s |  31 kB     00:01    
(17/33): policycoreutils-3.5-1.fc38.x86_64.rpm  188 kB/s | 241 kB     00:01    
(18/33): policycoreutils-python-utils-3.5-1.fc3  96 kB/s |  80 kB     00:00    
(19/33): protobuf-lite-3.19.6-2.fc38.x86_64.rpm 199 kB/s | 259 kB     00:01    
(20/33): python3-audit-3.1-2.fc38.x86_64.rpm    129 kB/s |  87 kB     00:00    
(21/33): python3-libselinux-3.5-1.fc38.x86_64.r 143 kB/s | 197 kB     00:01    
(22/33): python3-libsemanage-3.5-2.fc38.x86_64.  90 kB/s |  83 kB     00:00    
(23/33): python3-policycoreutils-3.5-1.fc38.noa 655 kB/s | 2.2 MB     00:03    
(24/33): libicu-72.1-2.fc38.x86_64.rpm          582 kB/s |  10 MB     00:18    
(25/33): python3-setools-4.4.1-1.fc38.x86_64.rp 454 kB/s | 614 kB     00:01    
(26/33): python3-setuptools-65.5.1-2.fc38.noarc 1.2 MB/s | 1.7 MB     00:01    
(27/33): qrencode-libs-4.1.1-4.fc38.x86_64.rpm   53 kB/s |  61 kB     00:01    
(28/33): systemd-253.2-1.fc38.x86_64.rpm        1.6 MB/s | 4.4 MB     00:02    
(29/33): systemd-networkd-253.2-1.fc38.x86_64.r 286 kB/s | 636 kB     00:02    
(30/33): systemd-resolved-253.2-1.fc38.x86_64.r 339 kB/s | 291 kB     00:00    
(31/33): systemd-pam-253.2-1.fc38.x86_64.rpm    354 kB/s | 345 kB     00:00    
(32/33): xkeyboard-config-2.38-1.fc38.noarch.rp 483 kB/s | 963 kB     00:01    
(33/33): community-mysql-server-8.0.32-1.fc38.x 505 kB/s |  17 MB     00:34    
--------------------------------------------------------------------------------
Total                                           1.0 MB/s |  45 MB     00:43     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : python3-libselinux-3.5-1.fc38.x86_64                  1/33 
  Installing       : mariadb-connector-c-config-3.2.7-3.fc38.noarch        2/33 
  Installing       : community-mysql-common-8.0.32-1.fc38.x86_64           3/33 
  Installing       : community-mysql-8.0.32-1.fc38.x86_64                  4/33 
  Installing       : community-mysql-errmsg-8.0.32-1.fc38.x86_64           5/33 
  Installing       : python3-libsemanage-3.5-2.fc38.x86_64                 6/33 
  Installing       : xkeyboard-config-2.38-1.fc38.noarch                   7/33 
  Installing       : libxkbcommon-1.5.0-2.fc38.x86_64                      8/33 
  Installing       : qrencode-libs-4.1.1-4.fc38.x86_64                     9/33 
  Installing       : python3-setuptools-65.5.1-2.fc38.noarch              10/33 
  Installing       : python3-setools-4.4.1-1.fc38.x86_64                  11/33 
  Installing       : python3-audit-3.1-2.fc38.x86_64                      12/33 
  Installing       : protobuf-lite-3.19.6-2.fc38.x86_64                   13/33 
  Installing       : numactl-libs-2.0.16-2.fc38.x86_64                    14/33 
  Installing       : mecab-0.996-3.fc38.5.x86_64                          15/33 
  Installing       : libselinux-utils-3.5-1.fc38.x86_64                   16/33 
  Installing       : policycoreutils-3.5-1.fc38.x86_64                    17/33 
  Running scriptlet: policycoreutils-3.5-1.fc38.x86_64                    17/33 
  Installing       : libseccomp-2.5.3-4.fc38.x86_64                       18/33 
  Installing       : libicu-72.1-2.fc38.x86_64                            19/33 
  Installing       : libargon2-20190702-2.fc38.x86_64                     20/33 
  Installing       : libaio-0.3.111-15.fc38.x86_64                        21/33 
  Installing       : kmod-libs-30-4.fc38.x86_64                           22/33 
  Installing       : device-mapper-libs-1.02.189-2.fc38.x86_64            23/33 
  Installing       : cryptsetup-libs-2.6.1-1.fc38.x86_64                  24/33 
  Installing       : device-mapper-1.02.189-2.fc38.x86_64                 25/33 
  Installing       : systemd-networkd-253.2-1.fc38.x86_64                 26/33 
  Running scriptlet: systemd-networkd-253.2-1.fc38.x86_64                 26/33 
  Installing       : systemd-pam-253.2-1.fc38.x86_64                      27/33 
  Installing       : systemd-resolved-253.2-1.fc38.x86_64                 28/33 
  Running scriptlet: systemd-resolved-253.2-1.fc38.x86_64                 28/33 
  Installing       : systemd-253.2-1.fc38.x86_64                          29/33 
  Running scriptlet: systemd-253.2-1.fc38.x86_64                          29/33 
Creating group 'input' with GID 104.
Creating group 'kvm' with GID 36.
Creating group 'render' with GID 105.
Creating group 'sgx' with GID 106.
Creating group 'systemd-journal' with GID 190.
Creating group 'systemd-network' with GID 192.
Creating user 'systemd-network' (systemd Network Management) with UID 192 and GID 192.
Creating group 'systemd-oom' with GID 999.
Creating user 'systemd-oom' (systemd Userspace OOM Killer) with UID 999 and GID 999.
Creating group 'systemd-resolve' with GID 193.
Creating user 'systemd-resolve' (systemd Resolver) with UID 193 and GID 193.

  Installing       : checkpolicy-3.5-1.fc38.x86_64                        30/33 
  Installing       : python3-policycoreutils-3.5-1.fc38.noarch            31/33 
  Installing       : policycoreutils-python-utils-3.5-1.fc38.noarch       32/33 
  Running scriptlet: community-mysql-server-8.0.32-1.fc38.x86_64          33/33 
  Installing       : community-mysql-server-8.0.32-1.fc38.x86_64          33/33 
  Running scriptlet: community-mysql-server-8.0.32-1.fc38.x86_64          33/33 
Failed to preset unit: Access denied

  Running scriptlet: systemd-resolved-253.2-1.fc38.x86_64                 33/33 
'/etc/resolv.conf' -> '../run/systemd/resolve/stub-resolv.conf'

  Running scriptlet: community-mysql-server-8.0.32-1.fc38.x86_64          33/33 
"/home" already exists and is not a directory.
fchownat() of /run/systemd/sessions failed: Operation not permitted
fchownat() of /run/systemd/users failed: Operation not permitted
fchownat() of /var/lib/systemd/coredump failed: Read-only file system
fchownat() of /tmp failed: Operation not permitted
Setting access ACL "u::rwx,g::r-x,g:adm:r-x,g:wheel:r-x,g:4294967295:r-x,g:4294967295:r-x,m::r-x,o::r-x" on /var/log/journal failed: Read-only file system
Failed to re-open '/var/log/journal': Operation not permitted
fchownat() of /var/log/journal failed: Read-only file system
Setting access ACL "u::rwx,g::r-x,g:adm:r-x,g:wheel:r-x,g:4294967295:r-x,g:4294967295:r-x,m::r-x,o::r-x" on /var/log/journal/ac806a68162f4e9fa4258fc1c50aab4b failed: Read-only file system
Failed to re-open '/var/log/journal/ac806a68162f4e9fa4258fc1c50aab4b': Operation not permitted
fchownat() of /var/log/journal/ac806a68162f4e9fa4258fc1c50aab4b failed: Read-only file system
fchownat() of /dev/snd/seq failed: Operation not permitted
fchownat() of /dev/snd/timer failed: Operation not permitted
fchownat() of /dev/loop-control failed: Operation not permitted
fchownat() of /dev/kvm failed: Operation not permitted
fchownat() of /dev/vhost-net failed: Operation not permitted
fchownat() of /dev/vhost-vsock failed: Operation not permitted
Setting access ACL "u::rw-,g::r-x,g:adm:r--,g:wheel:r--,g:4294967295:r-x,g:4294967295:r-x,m::r--,o::---" on /var/log/journal/ac806a68162f4e9fa4258fc1c50aab4b/system.journal failed: Read-only file system
fchownat() of /var/log/journal/ac806a68162f4e9fa4258fc1c50aab4b/system.journal failed: Read-only file system
fchownat() of /sys/kernel/security/tpm0/binary_bios_measurements failed: Operation not permitted
fchownat() of /sys/kernel/security/ima/binary_runtime_measurements failed: Operation not permitted

/var/tmp/rpm-tmp.kOzdW0: line 4: /usr/lib/systemd/systemd-sysctl: No such file or directory

Failed to reload daemon: Access denied

Failed to start transient service unit: Access denied
Failed to reload daemon: Transport endpoint is not connected
Failed to start transient service unit: Access denied
Failed to start jobs: Transport endpoint is not connected

  Verifying        : checkpolicy-3.5-1.fc38.x86_64                         1/33 
  Verifying        : community-mysql-8.0.32-1.fc38.x86_64                  2/33 
  Verifying        : community-mysql-common-8.0.32-1.fc38.x86_64           3/33 
  Verifying        : community-mysql-errmsg-8.0.32-1.fc38.x86_64           4/33 
  Verifying        : community-mysql-server-8.0.32-1.fc38.x86_64           5/33 
  Verifying        : cryptsetup-libs-2.6.1-1.fc38.x86_64                   6/33 
  Verifying        : device-mapper-1.02.189-2.fc38.x86_64                  7/33 
  Verifying        : device-mapper-libs-1.02.189-2.fc38.x86_64             8/33 
  Verifying        : kmod-libs-30-4.fc38.x86_64                            9/33 
  Verifying        : libaio-0.3.111-15.fc38.x86_64                        10/33 
  Verifying        : libargon2-20190702-2.fc38.x86_64                     11/33 
  Verifying        : libicu-72.1-2.fc38.x86_64                            12/33 
  Verifying        : libseccomp-2.5.3-4.fc38.x86_64                       13/33 
  Verifying        : libselinux-utils-3.5-1.fc38.x86_64                   14/33 
  Verifying        : libxkbcommon-1.5.0-2.fc38.x86_64                     15/33 
  Verifying        : mariadb-connector-c-config-3.2.7-3.fc38.noarch       16/33 
  Verifying        : mecab-0.996-3.fc38.5.x86_64                          17/33 
  Verifying        : numactl-libs-2.0.16-2.fc38.x86_64                    18/33 
  Verifying        : policycoreutils-3.5-1.fc38.x86_64                    19/33 
  Verifying        : policycoreutils-python-utils-3.5-1.fc38.noarch       20/33 
  Verifying        : protobuf-lite-3.19.6-2.fc38.x86_64                   21/33 
  Verifying        : python3-audit-3.1-2.fc38.x86_64                      22/33 
  Verifying        : python3-libselinux-3.5-1.fc38.x86_64                 23/33 
  Verifying        : python3-libsemanage-3.5-2.fc38.x86_64                24/33 
  Verifying        : python3-policycoreutils-3.5-1.fc38.noarch            25/33 
  Verifying        : python3-setools-4.4.1-1.fc38.x86_64                  26/33 
  Verifying        : python3-setuptools-65.5.1-2.fc38.noarch              27/33 
  Verifying        : qrencode-libs-4.1.1-4.fc38.x86_64                    28/33 
  Verifying        : systemd-253.2-1.fc38.x86_64                          29/33 
  Verifying        : systemd-networkd-253.2-1.fc38.x86_64                 30/33 
  Verifying        : systemd-pam-253.2-1.fc38.x86_64                      31/33 
  Verifying        : systemd-resolved-253.2-1.fc38.x86_64                 32/33 
  Verifying        : xkeyboard-config-2.38-1.fc38.noarch                  33/33 

Installed:
  checkpolicy-3.5-1.fc38.x86_64                                                 
  community-mysql-8.0.32-1.fc38.x86_64                                          
  community-mysql-common-8.0.32-1.fc38.x86_64                                   
  community-mysql-errmsg-8.0.32-1.fc38.x86_64                                   
  community-mysql-server-8.0.32-1.fc38.x86_64                                   
  cryptsetup-libs-2.6.1-1.fc38.x86_64                                           
  device-mapper-1.02.189-2.fc38.x86_64                                          
  device-mapper-libs-1.02.189-2.fc38.x86_64                                     
  kmod-libs-30-4.fc38.x86_64                                                    
  libaio-0.3.111-15.fc38.x86_64                                                 
  libargon2-20190702-2.fc38.x86_64                                              
  libicu-72.1-2.fc38.x86_64                                                     
  libseccomp-2.5.3-4.fc38.x86_64                                                
  libselinux-utils-3.5-1.fc38.x86_64                                            
  libxkbcommon-1.5.0-2.fc38.x86_64                                              
  mariadb-connector-c-config-3.2.7-3.fc38.noarch                                
  mecab-0.996-3.fc38.5.x86_64                                                   
  numactl-libs-2.0.16-2.fc38.x86_64                                             
  policycoreutils-3.5-1.fc38.x86_64                                             
  policycoreutils-python-utils-3.5-1.fc38.noarch                                
  protobuf-lite-3.19.6-2.fc38.x86_64                                            
  python3-audit-3.1-2.fc38.x86_64                                               
  python3-libselinux-3.5-1.fc38.x86_64                                          
  python3-libsemanage-3.5-2.fc38.x86_64                                         
  python3-policycoreutils-3.5-1.fc38.noarch                                     
  python3-setools-4.4.1-1.fc38.x86_64                                           
  python3-setuptools-65.5.1-2.fc38.noarch                                       
  qrencode-libs-4.1.1-4.fc38.x86_64                                             
  systemd-253.2-1.fc38.x86_64                                                   
  systemd-networkd-253.2-1.fc38.x86_64                                          
  systemd-pam-253.2-1.fc38.x86_64                                               
  systemd-resolved-253.2-1.fc38.x86_64                                          
  xkeyboard-config-2.38-1.fc38.noarch   

Consequently,

$ sudo systemctl start mysqld
Failed to start mysqld.service: Access denied
See system logs and 'systemctl status mysqld.service' for details.
$ sudo systemctl status mysqld.service
Unit mysqld.service could not be found.

Please kindly help me. Thank you.

Toolbox arguably is not the right tool for software intended to run as a background service. There’s no init process.

1 Like

More generally, Silverblue users would benefit from some guidelines for how to run different types of software. For development against a DB I would probably run Postgres in a docker container.

In addition, since Silverblue promotes spending most of one’s time inside a toolbox, it would be nice if toolboxes facilitate running commands on the host system, such as systemctl or journalctl.

Hello @handsomeguy ,
I would recommend using MySql’s official Docker image from MySql Docer Hub Image and follow their (MySql’s) directions for getting it going. I did it recently with PostgreSql and it went very smooth.

1 Like

@jakfrost, I was trying to follow the steps but was stucked even on the first step.

podman run --name mysql -e MYSQL_ROOT_PASSWORD=****** -d mysql:tag
✔ docker.io/library/mysql:tag
Trying to pull docker.io/library/mysql:tag...
Error: initializing source docker://mysql:tag: reading manifest tag in docker.io/library/mysql: manifest unknown

You need to tell it the version or “tag” used to specify which image version you want from the supported tags section. Such as …
podman run --name mysql -e MYSQL_ROOT_PASSWORD=****** -d mysql:5.7

1 Like