Linux proxmox54 4.15.18-30-pve #1 SMP PVE 4.15.18-58 (Fri, 12 Jun 2020 13:53:01 +0200) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Sep 22 17:34:55 2020 from 192.168.122.1 root@proxmox54:~# pct create 131 local:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz -hostname "web3.domain.com" -arch amd64 -cores 2 -memory 512 -swap 512 -net0 bridge=vmbr0,name=eth0,ip=192.168.122.192/24,gw=192.168.122.1 -onboot 1 -ostype ubuntu -rootfs local-lvm:30 Using default stripesize 64.00 KiB. For thin pool auto extension activation/thin_pool_autoextend_threshold should be below 100. Logical volume "vm-131-disk-0" created. WARNING: Sum of all thin volume sizes (30.00 GiB) exceeds the size of thin pool pve/data and the size of whole volume group (19.50 GiB)! mke2fs 1.43.4 (31-Jan-2017) Discarding device blocks: done Creating filesystem with 7864320 4k blocks and 1966080 inodes Filesystem UUID: 76e6e223-b7e6-41a0-8ae5-2dcee3738250 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Multiple mount protection is enabled with update interval 5 seconds. Writing superblocks and filesystem accounting information: done extracting archive '/var/lib/vz/template/cache/ubuntu-20.04-standard_20.04-1_amd64.tar.gz' Total bytes read: 669050880 (639MiB, 193MiB/s) Creating SSH host key 'ssh_host_dsa_key' - this may take some time ... done: SHA256:y1V8DxXBOtmiYBnNv6C1DQmuT0qb0O7OXuy1fExIwY4 root@web3 Creating SSH host key 'ssh_host_ed25519_key' - this may take some time ... done: SHA256:c+ykiuJKNWwOQRMtUyi2uibgZEpdFsJFAQAQfL+iOh8 root@web3 Creating SSH host key 'ssh_host_ecdsa_key' - this may take some time ... done: SHA256:g0iktpex1I+hu6Flvqrd0zqy8xDJHkPk+/FhGS2rxYo root@web3 Creating SSH host key 'ssh_host_rsa_key' - this may take some time ... done: SHA256:9jR8gzfgQiAvgAdvqR73LkhA52Ao3tcDhSKIHtSETb8 root@web3 root@proxmox54:~# pct start 131 root@proxmox54:~# pct ent 131 root@web3:~# mount /dev/mapper/pve-vm--131--disk--0 on / type ext4 (rw,relatime,stripe=16,data=ordered) none on /dev type tmpfs (rw,relatime,size=492k,mode=755) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) proc on /proc/sys/net type proc (rw,nosuid,nodev,noexec,relatime) proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime) proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime) sysfs on /sys/devices/virtual/net type sysfs (rw,relatime) sysfs on /sys/devices/virtual/net type sysfs (rw,nosuid,nodev,noexec,relatime) lxcfs on /proc/cpuinfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/diskstats type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/loadavg type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/meminfo type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/stat type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/swaps type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) lxcfs on /proc/uptime type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) devpts on /dev/lxc/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) devpts on /dev/console type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024) devpts on /dev/ptmx type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024) devpts on /dev/lxc/tty1 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024) devpts on /dev/lxc/tty2 type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1024) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run type tmpfs (rw,nosuid,nodev,size=1023120k,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) root@web3:~# root@web3:~# curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash Could not find command-not-found database. Run 'sudo apt update' to populate it. curl: command not found root@web3:~# apt-get install curl Reading package lists... Done Building dependency tree... Done The following additional packages will be installed: libasn1-8-heimdal libbrotli1 libcurl4 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2 libldap-common libnghttp2-14 libroken18-heimdal librtmp1 libssh-4 libwind0-heimdal The following NEW packages will be installed: curl libasn1-8-heimdal libbrotli1 libcurl4 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2 libldap-common libnghttp2-14 libroken18-heimdal librtmp1 libssh-4 libwind0-heimdal 0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded. Need to get 1955 kB of archives. After this operation, 6444 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libbrotli1 amd64 1.0.7-6build1 [270 kB] Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libroken18-heimdal amd64 7.7.0+dfsg-1ubuntu1 [41.8 kB] Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libasn1-8-heimdal amd64 7.7.0+dfsg-1ubuntu1 [181 kB] Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libheimbase1-heimdal amd64 7.7.0+dfsg-1ubuntu1 [29.7 kB] Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 libhcrypto4-heimdal amd64 7.7.0+dfsg-1ubuntu1 [87.9 kB] Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 libwind0-heimdal amd64 7.7.0+dfsg-1ubuntu1 [48.0 kB] Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 libhx509-5-heimdal amd64 7.7.0+dfsg-1ubuntu1 [107 kB] Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libkrb5-26-heimdal amd64 7.7.0+dfsg-1ubuntu1 [208 kB] Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 libheimntlm0-heimdal amd64 7.7.0+dfsg-1ubuntu1 [15.1 kB] Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 libgssapi3-heimdal amd64 7.7.0+dfsg-1ubuntu1 [96.1 kB] Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libldap-common all 2.4.49+dfsg-2ubuntu1 [17.3 kB] Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 libldap-2.4-2 amd64 2.4.49+dfsg-2ubuntu1 [156 kB] Get:13 http://archive.ubuntu.com/ubuntu focal/main amd64 libnghttp2-14 amd64 1.40.0-1build1 [78.7 kB] Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build1 [54.9 kB] Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libssh-4 amd64 0.9.3-2ubuntu2 [170 kB] Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libcurl4 amd64 7.68.0-1ubuntu2 [233 kB] Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 curl amd64 7.68.0-1ubuntu2 [161 kB] Fetched 1955 kB in 3s (598 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Selecting previously unselected package libbrotli1:amd64. (Reading database ... 17384 files and directories currently installed.) Preparing to unpack .../00-libbrotli1_1.0.7-6build1_amd64.deb ... Unpacking libbrotli1:amd64 (1.0.7-6build1) ... Selecting previously unselected package libroken18-heimdal:amd64. Preparing to unpack .../01-libroken18-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libasn1-8-heimdal:amd64. Preparing to unpack .../02-libasn1-8-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libheimbase1-heimdal:amd64. Preparing to unpack .../03-libheimbase1-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libhcrypto4-heimdal:amd64. Preparing to unpack .../04-libhcrypto4-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libwind0-heimdal:amd64. Preparing to unpack .../05-libwind0-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libhx509-5-heimdal:amd64. Preparing to unpack .../06-libhx509-5-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libkrb5-26-heimdal:amd64. Preparing to unpack .../07-libkrb5-26-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libheimntlm0-heimdal:amd64. Preparing to unpack .../08-libheimntlm0-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libgssapi3-heimdal:amd64. Preparing to unpack .../09-libgssapi3-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ... Unpacking libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Selecting previously unselected package libldap-common. Preparing to unpack .../10-libldap-common_2.4.49+dfsg-2ubuntu1_all.deb ... Unpacking libldap-common (2.4.49+dfsg-2ubuntu1) ... Selecting previously unselected package libldap-2.4-2:amd64. Preparing to unpack .../11-libldap-2.4-2_2.4.49+dfsg-2ubuntu1_amd64.deb ... Unpacking libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1) ... Selecting previously unselected package libnghttp2-14:amd64. Preparing to unpack .../12-libnghttp2-14_1.40.0-1build1_amd64.deb ... Unpacking libnghttp2-14:amd64 (1.40.0-1build1) ... Selecting previously unselected package librtmp1:amd64. Preparing to unpack .../13-librtmp1_2.4+20151223.gitfa8646d.1-2build1_amd64.deb ... Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ... Selecting previously unselected package libssh-4:amd64. Preparing to unpack .../14-libssh-4_0.9.3-2ubuntu2_amd64.deb ... Unpacking libssh-4:amd64 (0.9.3-2ubuntu2) ... Selecting previously unselected package libcurl4:amd64. Preparing to unpack .../15-libcurl4_7.68.0-1ubuntu2_amd64.deb ... Unpacking libcurl4:amd64 (7.68.0-1ubuntu2) ... Selecting previously unselected package curl. Preparing to unpack .../16-curl_7.68.0-1ubuntu2_amd64.deb ... Unpacking curl (7.68.0-1ubuntu2) ... Setting up libbrotli1:amd64 (1.0.7-6build1) ... Setting up libnghttp2-14:amd64 (1.40.0-1build1) ... Setting up libldap-common (2.4.49+dfsg-2ubuntu1) ... Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ... Setting up libssh-4:amd64 (0.9.3-2ubuntu2) ... Setting up libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ... Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1) ... Setting up libcurl4:amd64 (7.68.0-1ubuntu2) ... Setting up curl (7.68.0-1ubuntu2) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9) ... root@web3:~# curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash [info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list [info] Adding trusted package signing keys... [info] Running apt-get update... [info] Done adding trusted package signing keys root@web3:~# export DEBIAN_SCRIPT_DEBUG=1 root@web3:~# apt-get -y install mariadb-server Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: galera-4 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libencode-locale-perl libfcgi-perl libgdbm-compat4 libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libperl5.30 libreadline5 libsigsegv2 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-10.5 mariadb-server-core-10.5 mysql-common perl perl-modules-5.30 socat Suggested packages: gawk-doc libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl make libb-debug-perl liblocale-codes-perl The following NEW packages will be installed: galera-4 gawk libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mariadb-perl libdbi-perl libencode-locale-perl libfcgi-perl libgdbm-compat4 libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient21 libperl5.30 libreadline5 libsigsegv2 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server mariadb-server-10.5 mariadb-server-core-10.5 mysql-common perl perl-modules-5.30 socat 0 upgraded, 35 newly installed, 0 to remove and 94 not upgraded. Need to get 37.0 MB of archives. After this operation, 278 MB of additional disk space will be used. Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libsigsegv2 amd64 2.12-2 [13.9 kB] Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 gawk amd64 1:5.0.1+dfsg-1 [418 kB] Get:1 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mysql-common all 1:10.5.5+maria~focal [3260 B] Get:3 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-common all 1:10.5.5+maria~focal [4196 B] Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 perl-modules-5.30 all 5.30.0-9build1 [2737 kB] Get:5 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 galera-4 amd64 26.4.5-focal [12.7 MB] Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libgdbm-compat4 amd64 1.18.1-5 [6244 B] Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 libperl5.30 amd64 5.30.0-9build1 [3943 kB] Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 perl amd64 5.30.0-9build1 [224 kB] Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libdbi-perl amd64 1.643-1 [730 kB] Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libreadline5 amd64 5.2+dfsg-3build3 [100 kB] Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libaio1 amd64 0.3.112-5 [7184 B] Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 socat amd64 1.7.3.3-2 [323 kB] Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libhtml-tagset-perl all 3.20-4 [12.5 kB] Get:21 http://archive.ubuntu.com/ubuntu focal/main amd64 liburi-perl all 1.76-2 [77.5 kB] Get:22 http://archive.ubuntu.com/ubuntu focal/main amd64 libhtml-parser-perl amd64 3.72-5 [86.3 kB] Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 libcgi-pm-perl all 4.46-1 [186 kB] Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libfcgi-perl amd64 0.79-1 [33.1 kB] Get:25 http://archive.ubuntu.com/ubuntu focal/main amd64 libcgi-fast-perl all 1:2.15-1 [10.5 kB] Get:26 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libmysqlclient21 amd64 8.0.21-0ubuntu0.20.04.4 [1222 kB] Get:27 http://archive.ubuntu.com/ubuntu focal/universe amd64 libdbd-mariadb-perl amd64 1.11-3ubuntu2 [105 kB] Get:28 http://archive.ubuntu.com/ubuntu focal/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB] Get:29 http://archive.ubuntu.com/ubuntu focal/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB] Get:30 http://archive.ubuntu.com/ubuntu focal/main amd64 libtimedate-perl all 2.3200-1 [34.0 kB] Get:31 http://archive.ubuntu.com/ubuntu focal/main amd64 libhttp-date-perl all 6.05-1 [9920 B] Get:32 http://archive.ubuntu.com/ubuntu focal/main amd64 libio-html-perl all 1.001-1 [14.9 kB] Get:33 http://archive.ubuntu.com/ubuntu focal/main amd64 liblwp-mediatypes-perl all 6.04-1 [19.5 kB] Get:34 http://archive.ubuntu.com/ubuntu focal/main amd64 libhttp-message-perl all 6.22-1 [76.1 kB] Get:35 http://archive.ubuntu.com/ubuntu focal/main amd64 libterm-readkey-perl amd64 2.38-1build1 [24.6 kB] Get:6 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 libmariadb3 amd64 1:10.5.5+maria~focal [147 kB] Get:7 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-client-core-10.5 amd64 1:10.5.5+maria~focal [774 kB] Get:9 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-client-10.5 amd64 1:10.5.5+maria~focal [1545 kB] Get:10 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-server-core-10.5 amd64 1:10.5.5+maria~focal [6950 kB] Get:13 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-server-10.5 amd64 1:10.5.5+maria~focal [4403 kB] Get:16 https://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu focal/main amd64 mariadb-server all 1:10.5.5+maria~focal [3212 B] Fetched 37.0 MB in 17s (2117 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory Extracting templates from packages: 100% Preconfiguring packages ... + DEBIAN_SCRIPT_TRACE=1 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + echo '#42#DEBUG# RUNNING /tmp/mariadb-server-10.5.config.Ih7BtO configure ' '1>&2' #42#DEBUG# RUNNING /tmp/mariadb-server-10.5.config.Ih7BtO configure 1>&2 # Beware that there are two ypwhich one of them needs the 2>/dev/null! if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then db_input high mariadb-server-10.0/nis_warning || true db_go fi ++ which ypwhich + test -n '' Selecting previously unselected package libsigsegv2:amd64. (Reading database ... 17495 files and directories currently installed.) Preparing to unpack .../libsigsegv2_2.12-2_amd64.deb ... Unpacking libsigsegv2:amd64 (2.12-2) ... Setting up libsigsegv2:amd64 (2.12-2) ... Selecting previously unselected package gawk. (Reading database ... 17502 files and directories currently installed.) Preparing to unpack .../00-gawk_1%3a5.0.1+dfsg-1_amd64.deb ... Unpacking gawk (1:5.0.1+dfsg-1) ... Selecting previously unselected package mysql-common. Preparing to unpack .../01-mysql-common_1%3a10.5.5+maria~focal_all.deb ... Unpacking mysql-common (1:10.5.5+maria~focal) ... Selecting previously unselected package mariadb-common. Preparing to unpack .../02-mariadb-common_1%3a10.5.5+maria~focal_all.deb ... Unpacking mariadb-common (1:10.5.5+maria~focal) ... Selecting previously unselected package galera-4. Preparing to unpack .../03-galera-4_26.4.5-focal_amd64.deb ... Unpacking galera-4 (26.4.5-focal) ... Selecting previously unselected package perl-modules-5.30. Preparing to unpack .../04-perl-modules-5.30_5.30.0-9build1_all.deb ... Unpacking perl-modules-5.30 (5.30.0-9build1) ... Selecting previously unselected package libgdbm-compat4:amd64. Preparing to unpack .../05-libgdbm-compat4_1.18.1-5_amd64.deb ... Unpacking libgdbm-compat4:amd64 (1.18.1-5) ... Selecting previously unselected package libperl5.30:amd64. Preparing to unpack .../06-libperl5.30_5.30.0-9build1_amd64.deb ... Unpacking libperl5.30:amd64 (5.30.0-9build1) ... Selecting previously unselected package perl. Preparing to unpack .../07-perl_5.30.0-9build1_amd64.deb ... Unpacking perl (5.30.0-9build1) ... Selecting previously unselected package libdbi-perl:amd64. Preparing to unpack .../08-libdbi-perl_1.643-1_amd64.deb ... Unpacking libdbi-perl:amd64 (1.643-1) ... Selecting previously unselected package libmariadb3:amd64. Preparing to unpack .../09-libmariadb3_1%3a10.5.5+maria~focal_amd64.deb ... Unpacking libmariadb3:amd64 (1:10.5.5+maria~focal) ... Selecting previously unselected package libreadline5:amd64. Preparing to unpack .../10-libreadline5_5.2+dfsg-3build3_amd64.deb ... Unpacking libreadline5:amd64 (5.2+dfsg-3build3) ... Selecting previously unselected package mariadb-client-core-10.5. Preparing to unpack .../11-mariadb-client-core-10.5_1%3a10.5.5+maria~focal_amd64.deb ... Unpacking mariadb-client-core-10.5 (1:10.5.5+maria~focal) ... Selecting previously unselected package mariadb-client-10.5. Preparing to unpack .../12-mariadb-client-10.5_1%3a10.5.5+maria~focal_amd64.deb ... Unpacking mariadb-client-10.5 (1:10.5.5+maria~focal) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../13-libaio1_0.3.112-5_amd64.deb ... Unpacking libaio1:amd64 (0.3.112-5) ... Selecting previously unselected package mariadb-server-core-10.5. Preparing to unpack .../14-mariadb-server-core-10.5_1%3a10.5.5+maria~focal_amd64.deb ... Unpacking mariadb-server-core-10.5 (1:10.5.5+maria~focal) ... Selecting previously unselected package socat. Preparing to unpack .../15-socat_1.7.3.3-2_amd64.deb ... Unpacking socat (1.7.3.3-2) ... Setting up mysql-common (1:10.5.5+maria~focal) ... Setting up mariadb-common (1:10.5.5+maria~focal) ... Selecting previously unselected package mariadb-server-10.5. (Reading database ... 20027 files and directories currently installed.) Preparing to unpack .../00-mariadb-server-10.5_1%3a10.5.5+maria~focal_amd64.deb ... locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory + DEBIAN_SCRIPT_TRACE=1 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + echo '#42#DEBUG# RUNNING /var/lib/dpkg/tmp.ci/config configure ' '1>&2' #42#DEBUG# RUNNING /var/lib/dpkg/tmp.ci/config configure 1>&2 # Beware that there are two ypwhich one of them needs the 2>/dev/null! if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then db_input high mariadb-server-10.0/nis_warning || true db_go fi ++ which ypwhich + test -n '' + DEBIAN_SCRIPT_TRACE=1 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + echo '#42#DEBUG# RUNNING /var/lib/dpkg/tmp.ci/preinst install' '1>&2' #42#DEBUG# RUNNING /var/lib/dpkg/tmp.ci/preinst install 1>&2 export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin mysql_datadir=/var/lib/mysql + mysql_datadir=/var/lib/mysql mysql_upgradedir=/var/lib/mysql-upgrade + mysql_upgradedir=/var/lib/mysql-upgrade # Try to stop the server in a sane way. If it does not success let the admin # do it himself. No database directories should be removed while the server # is running! Another mariadbd in e.g. a different chroot is fine for us. stop_server() { # Return immediately if there are no mysql processes running # as there is no point in trying to shutdown in that case. if ! pgrep -x --ns $$ mariadbd > /dev/null; then return; fi # Compatibility with versions that ran 'mysqld' if ! pgrep -x --ns $$ mysqld > /dev/null; then return; fi set +e invoke-rc.d mariadb stop invoke-rc.d mysql stop # Backwards compatibility errno=$? set -e # systemctl could emit exit code 100=no init script (fresh install) if [ "$errno" != 0 -a "$errno" != 100 ]; then echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2 echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2 echo "Stop it yourself and try again!" 1>&2 db_stop exit 1 fi } ################################ main() ########################## this_version=$MAJOR_VER + this_version=10.5 max_upgradeable_version=5.7 + max_upgradeable_version=5.7 # Check if a flag file is found that indicates a previous MariaDB or MySQL # version was installed. If multiple flags are found, check which one was # the biggest version number. for flag in $mysql_datadir/debian-*.flag do # The for loop leaves $flag as the query string if there are no results, # so the check below is needed to stop further processing when there are # no real results. if [ "$flag" = "$mysql_datadir/debian-*.flag" ] then break fi flag_version=$(echo "$flag" | sed 's/.*debian-\([0-9\.]\+\).flag/\1/') # Initialize value if empty if [ -z "$found_version" ] then found_version=$flag_version fi # Update value if now bigger then before if dpkg --compare-versions "$flag_version" '>>' "$found_version" then found_version=$flag_version fi done + for flag in $mysql_datadir/debian-*.flag + '[' '/var/lib/mysql/debian-*.flag' = '/var/lib/mysql/debian-*.flag' ']' + break # If an upgrade is detected, proceed with it automatically without # requiring any user interaction. # # However, if the user attempts to downgrade, warn about the incompatibility. # Downgrade is detected if the flag version is bigger than $this_version # (e.g. 10.1 > 10.0) or the flag version is smaller than 10.0 but bigger # than $max_upgradeable_version. if [ ! -z "$found_version" ] then # MySQL 8.0 in Ubuntu has a bug in packaging and the file is name wrongly # 'debian-5.7.flag', so in case '5.7' was encountered an extra check needs to # be done to see is there is a file called undo_001, which is a sign of 8.0. if [ "$found_version" == "5.7" ] && [ -f "$mysql_datadir/undo_001" ] then # Seems to be a 8.0, flag has wrongly 5.7 (know bug) found_version=8.0 fi echo "$mysql_datadir: found previous version $found_version" if dpkg --compare-versions "$found_version" '>>' "$this_version" then downgrade_detected=true fi if dpkg --compare-versions "$found_version" '>>' "$max_upgradeable_version" \ && dpkg --compare-versions "$found_version" '<<' "10.0" then downgrade_detected=true fi fi + '[' '!' -z '' ']' # Don't abort dpkg if downgrade is detected (as was done previously). # Instead simply move the old datadir and create a new for this_version. if [ ! -z "$downgrade_detected" ] then db_input critical "mariadb-server-$MAJOR_VER/old_data_directory_saved" || true db_go echo "The file $mysql_datadir/debian-$found_version.flag indicates a" 1>&2 echo "version that cannot automatically be upgraded. Therefore the" 1>&2 echo "previous data directory will be renamed to $mysql_datadir-$found_version and" 1>&2 echo "a new data directory will be initialized at $mysql_datadir." 1>&2 echo "Please manually export/import your data (e.g. with mysqldump) if needed." 1>&2 mv -f "$mysql_datadir" "$mysql_datadir-$found_version" # Also move away the old debian.cnf file that included credentials that are # no longer valid mv -f /etc/mysql/debian.cnf "/etc/mysql/debian.cnf-$found_version" fi + '[' '!' -z '' ']' # to be sure stop_server + stop_server + pgrep -x --ns 1295 mariadbd + return # If we use NIS then errors should be tolerated. It's up to the # user to ensure that the mysql user is correctly setup. # Beware that there are two ypwhich one of them needs the 2>/dev/null! if test -n "$(which ypwhich 2>/dev/null)" && ypwhich >/dev/null 2>&1; then set +e fi ++ which ypwhich + test -n '' # # Now we have to ensure the following state: # /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false # /etc/group: mysql:x:101: # # Sadly there could any state be present on the system so we have to # modify everything carefully i.e. not doing a chown before creating # the user etc... # # creating mysql group if he isn't already there if ! getent group mysql >/dev/null; then # Adding system group: mysql. addgroup --system mysql >/dev/null fi + getent group mysql + addgroup --system mysql # creating mysql user if he isn't already there if ! getent passwd mysql >/dev/null; then # Adding system user: mysql. adduser \ --system \ --disabled-login \ --ingroup mysql \ --no-create-home \ --home /nonexistent \ --gecos "MySQL Server" \ --shell /bin/false \ mysql >/dev/null fi + getent passwd mysql + adduser --system --disabled-login --ingroup mysql --no-create-home --home /nonexistent --gecos 'MySQL Server' --shell /bin/false mysql # end of NIS tolerance zone set -e + set -e # if there's a symlink, let's store where it's pointing, because otherwise # it's going to be lost in some situations for dir in DATADIR LOGDIR; do checkdir=$(eval echo "$"$dir) if [ -L "$checkdir" ]; then # Use mkdir option 'Z' to create with correct SELinux context. mkdir -pZ "$mysql_upgradedir" cp -dT "$checkdir" "$mysql_upgradedir/$dir.link" fi done + for dir in DATADIR LOGDIR ++ eval echo '$DATADIR' +++ echo + checkdir= + '[' -L '' ']' + for dir in DATADIR LOGDIR ++ eval echo '$LOGDIR' +++ echo + checkdir= + '[' -L '' ']' # creating mysql home directory if [ ! -d $mysql_datadir ] && [ ! -L $mysql_datadir ]; then # Use mkdir option 'Z' to create with correct SELinux context. mkdir -Z $mysql_datadir fi + '[' '!' -d /var/lib/mysql ']' + '[' '!' -L /var/lib/mysql ']' + mkdir -Z /var/lib/mysql # checking disc space if LC_ALL=C BLOCKSIZE= df --portability $mysql_datadir/. | tail -n 1 | awk '{ exit ($4>1000) }'; then echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2 db_stop exit 1 fi + tail -n 1 + LC_ALL=C + BLOCKSIZE= + df --portability /var/lib/mysql/. + awk '{ exit ($4>1000) }' # Since the home directory was created before putting the user into # the mysql group and moreover we cannot guarantee that the # permissions were correctly *before* calling this script, we fix them now. # In case we use NIS and no mysql user is present then this script should # better fail now than later.. # The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is # not chgrp'able (#318435). set +e + set +e find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql + xargs -0 -r chown mysql ++ id -u mysql + find /var/lib/mysql '!' -uid 110 -print0 find $mysql_datadir -follow -not -group mysql -print0 2>/dev/null \ | xargs -0 --no-run-if-empty chgrp mysql + find /var/lib/mysql -follow -not -group mysql -print0 + xargs -0 --no-run-if-empty chgrp mysql set -e + set -e db_stop + db_stop + echo STOP Unpacking mariadb-server-10.5 (1:10.5.5+maria~focal) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../01-libhtml-tagset-perl_3.20-4_all.deb ... Unpacking libhtml-tagset-perl (3.20-4) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../02-liburi-perl_1.76-2_all.deb ... Unpacking liburi-perl (1.76-2) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../03-libhtml-parser-perl_3.72-5_amd64.deb ... Unpacking libhtml-parser-perl (3.72-5) ... Selecting previously unselected package libcgi-pm-perl. Preparing to unpack .../04-libcgi-pm-perl_4.46-1_all.deb ... Unpacking libcgi-pm-perl (4.46-1) ... Selecting previously unselected package libfcgi-perl. Preparing to unpack .../05-libfcgi-perl_0.79-1_amd64.deb ... Unpacking libfcgi-perl (0.79-1) ... Selecting previously unselected package libcgi-fast-perl. Preparing to unpack .../06-libcgi-fast-perl_1%3a2.15-1_all.deb ... Unpacking libcgi-fast-perl (1:2.15-1) ... Selecting previously unselected package libmysqlclient21:amd64. Preparing to unpack .../07-libmysqlclient21_8.0.21-0ubuntu0.20.04.4_amd64.deb ... Unpacking libmysqlclient21:amd64 (8.0.21-0ubuntu0.20.04.4) ... Selecting previously unselected package libdbd-mariadb-perl. Preparing to unpack .../08-libdbd-mariadb-perl_1.11-3ubuntu2_amd64.deb ... Unpacking libdbd-mariadb-perl (1.11-3ubuntu2) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../09-libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libhtml-template-perl. Preparing to unpack .../10-libhtml-template-perl_2.97-1_all.deb ... Unpacking libhtml-template-perl (2.97-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../11-libtimedate-perl_2.3200-1_all.deb ... Unpacking libtimedate-perl (2.3200-1) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../12-libhttp-date-perl_6.05-1_all.deb ... Unpacking libhttp-date-perl (6.05-1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../13-libio-html-perl_1.001-1_all.deb ... Unpacking libio-html-perl (1.001-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../14-liblwp-mediatypes-perl_6.04-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.04-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../15-libhttp-message-perl_6.22-1_all.deb ... Unpacking libhttp-message-perl (6.22-1) ... Selecting previously unselected package libterm-readkey-perl. Preparing to unpack .../16-libterm-readkey-perl_2.38-1build1_amd64.deb ... Unpacking libterm-readkey-perl (2.38-1build1) ... Selecting previously unselected package mariadb-server. Preparing to unpack .../17-mariadb-server_1%3a10.5.5+maria~focal_all.deb ... Unpacking mariadb-server (1:10.5.5+maria~focal) ... Setting up galera-4 (26.4.5-focal) ... Setting up libmysqlclient21:amd64 (8.0.21-0ubuntu0.20.04.4) ... Setting up libreadline5:amd64 (5.2+dfsg-3build3) ... Setting up perl-modules-5.30 (5.30.0-9build1) ... Setting up gawk (1:5.0.1+dfsg-1) ... Setting up socat (1.7.3.3-2) ... Setting up libmariadb3:amd64 (1:10.5.5+maria~focal) ... Setting up libgdbm-compat4:amd64 (1.18.1-5) ... Setting up libperl5.30:amd64 (5.30.0-9build1) ... Setting up libaio1:amd64 (0.3.112-5) ... Setting up mariadb-server-core-10.5 (1:10.5.5+maria~focal) ... Setting up perl (5.30.0-9build1) ... Setting up libio-html-perl (1.001-1) ... Setting up mariadb-client-core-10.5 (1:10.5.5+maria~focal) ... Setting up libtimedate-perl (2.3200-1) ... Setting up mariadb-client-10.5 (1:10.5.5+maria~focal) ... Setting up libfcgi-perl (0.79-1) ... Setting up libterm-readkey-perl (2.38-1build1) ... Setting up liburi-perl (1.76-2) ... Setting up libdbi-perl:amd64 (1.643-1) ... Setting up libhttp-date-perl (6.05-1) ... Setting up libhtml-tagset-perl (3.20-4) ... Setting up liblwp-mediatypes-perl (6.04-1) ... Setting up libencode-locale-perl (1.05-1) ... Setting up mariadb-server-10.5 (1:10.5.5+maria~focal) ... locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory + DEBIAN_SCRIPT_TRACE=1 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + echo '#42#DEBUG# RUNNING /var/lib/dpkg/info/mariadb-server-10.5.config configure ' '1>&2' #42#DEBUG# RUNNING /var/lib/dpkg/info/mariadb-server-10.5.config configure 1>&2 # Beware that there are two ypwhich one of them needs the 2>/dev/null! if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then db_input high mariadb-server-10.0/nis_warning || true db_go fi ++ which ypwhich + test -n '' + DEBIAN_SCRIPT_TRACE=1 ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + echo '#42#DEBUG# RUNNING /var/lib/dpkg/info/mariadb-server-10.5.postinst configure ' '1>&2' #42#DEBUG# RUNNING /var/lib/dpkg/info/mariadb-server-10.5.postinst configure 1>&2 export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin # This command can be used as pipe to syslog. With "-s" it also logs to stderr. ERR_LOGGER="logger -p daemon.err -t mariadb-server-$MAJOR_VER.postinst -i" + ERR_LOGGER='logger -p daemon.err -t mariadb-server-10.5.postinst -i' # Specify syslog tag name so it is clear the entry came from this postinst script. # This will make an error in a logged command immediately apparent by aborting # the install, rather than failing silently and leaving a broken install. set -o pipefail + set -o pipefail case "$1" in configure) # This is needed because mysql_install_db removes the pid file in /run # and because changed configuration options should take effect immediately. # In case the server wasn't running at all it should be ok if the stop # script fails. I can't tell at this point because of the cleaned /run. set +e; invoke-rc.d mariadb stop; set -e # An existing /etc/init.d/mysql might be on the system if there was a # previous MySQL or MariaDB installation, since /etc/init.d files are # considered config files and stay around even after the package is removed. # # The install step of this package adds a new /etc/init.d/mariadb file. As # we also want to ensure that there are no old (and potentially outdated) # versions of /etc/init.d/mysql we simply replace it using a copy of the # latest 'mariadb' file. This has also the added benefit that anything that # invokes traditional sysv init with either 'mysql' or 'mariadb' will end up # controlling this newly installed MariaDB, and thus we maintain better # backwards compatiblity. # # Note that the 'Provides' line is also updated to avoid 'insserv' exiting # on failure (when it is run by update-rc.d) because of duplicate service # names. if [ -f "/etc/init.d/mysql" ] && [ -f "/etc/init.d/mariadb" ] then # Copy init file and rename the service name and filename on the fly sed 's/Provides: mariadb/Provides: mysql/g' /etc/init.d/mariadb > /etc/init.d/mysql # NOTE: Number of spaces/tabs is important here! # Confirm if the sed worked if ! grep --quiet "Provides: mysql" /etc/init.d/mysql then # If not, then delete the file to avoid failures later on rm -f /etc/init.d/mysql echo "Warning! Failed creating a mysql named copy of mariadb init.d file" fi fi mysql_statedir=/usr/share/mysql mysql_datadir=/var/lib/mysql mysql_logdir=/var/log/mysql mysql_cfgdir=/etc/mysql mysql_upgradedir=/var/lib/mysql-upgrade # If the following symlink exists, it is a preserved copy the old data dir # created by the preinst script during a upgrade that would have otherwise # been replaced by an empty mysql dir. This should restore it. for dir in DATADIR LOGDIR; do if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_datadir else targetdir=$mysql_logdir fi savelink="$mysql_upgradedir/$dir.link" if [ -L "$savelink" ]; then # If the targetdir was a symlink before we upgraded it is supposed # to be either still be present or not existing anymore now. if [ -L "$targetdir" ]; then rm "$savelink" elif [ ! -d "$targetdir" ]; then mv "$savelink" "$targetdir" else # this should never even happen, but just in case... mysql_tmp=$(mktemp -d -t mysql-symlink-restore-XXXXXX) echo "this is very strange! see $mysql_tmp/README..." >&2 mv "$targetdir" "$mysql_tmp" cat << EOF > "$mysql_tmp/README" If you're reading this, it's most likely because you had replaced /var/lib/mysql with a symlink, then upgraded to a new version of mysql, and then dpkg removed your symlink (see #182747 and others). The mysql packages noticed that this happened, and as a workaround have restored it. However, because /var/lib/mysql seems to have been re-created in the meantime, and because we don't want to rm -rf something we don't know as much about, we are going to leave this unexpected directory here. If your database looks normal, and this is not a symlink to your database, you should be able to blow this all away. EOF fi fi rmdir $mysql_upgradedir 2>/dev/null || true done # Ensure the existence and right permissions for the database and # log files. Use mkdir option 'Z' to create with correct SELinux context. if [ ! -d "$mysql_statedir" ] && [ ! -L "$mysql_statedir" ]; then mkdir -Z "$mysql_statedir"; fi if [ ! -d "$mysql_datadir" ] && [ ! -L "$mysql_datadir" ]; then mkdir -Z "$mysql_datadir" ; fi if [ ! -d "$mysql_logdir" ] && [ ! -L "$mysql_logdir" ]; then mkdir -Z "$mysql_logdir" ; fi # When creating an ext3 jounal on an already mounted filesystem like e.g. # /var/lib/mysql, you get a .journal file that is not modifyable by chown. # The mysql_statedir must not be writable by the mysql user under any # circumstances as it contains scripts that are executed by root. set +e chown -R 0:0 $mysql_statedir find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql chown -R mysql:adm $mysql_logdir chmod 2750 $mysql_logdir set -e ## Set the correct filesystem ownership for the PAM v2 plugin # eg. /usr/lib/x86_64-linux-gnu/mysql/plugin/auth_pam_tool_dir/ # NOTE! This is security sensitive, don't allow for a race condition. # # 1. Drop privileges of directory # -> At this point only root can see and execute auth_pam_tool chmod 0700 /usr/lib/mysql/plugin/auth_pam_tool_dir # # 2. Make binary setuid # -> At this point only root can run the setuid binary so no escalation here yet chmod 04755 /usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool # # 3. Allow user 'mysql' to see and execute auth_pam_tool # -> Now user mysql owns the directory and can see and execute the binary inside # -> Since the binary is setuid, user mysql gets limited root powers here to # run the PAM authetications, which need root (e.g. to validate passwords # against /etc/shadow) chown mysql /usr/lib/mysql/plugin/auth_pam_tool_dir # This is important to avoid dataloss when there is a removed # mysql-server version from Woody lying around which used the same # data directory and then somewhen gets purged by the admin. db_set mariadb-server/postrm_remove_database false || true # Clean up old flags before setting new one rm -f $mysql_datadir/debian-*.flag # Flag data dir to avoid downgrades touch "$mysql_datadir/debian-$MAJOR_VER.flag" # initiate databases. Output is not allowed by debconf :-( # This will fail if we are upgrading an existing database; in this case # mysql_upgrade, called from the /etc/init.d/mariadb start script, will # handle things. # Debian: beware of the bashisms... # Debian: can safely run on upgrades with existing databases set +e bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql \ --disable-log-bin --skip-test-db 2>&1 | \ $ERR_LOGGER set -e # To avoid downgrades. touch "$mysql_statedir/debian-$MAJOR_VER.flag" # On new installations root user can connect via unix_socket. # But on upgrades, scripts rely on debian-sys-maint user and # credentials in /etc/mysql/debian.cnf # All tools use --defaults-file=/etc/mysql/debian.cnf # And while it's not needed for new installations, we keep using # --defaults-file option for tools (for the sake of upgrades) # and thus need /etc/mysql/debian.cnf to exist, even if it's empty. dc=$mysql_cfgdir/debian.cnf; if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir fi if [ ! -e "$dc" ]; then cat /dev/null > $dc echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc fi # Keep it only root-readable, as it always was chown 0:0 $dc chmod 0600 $dc # If there is a real AppArmor profile, we reload it. # If the default empty profile is installed, then we remove any old # profile that may be loaded. # This allows upgrade from old versions (that have an apparmor profile # on by default) to work both to disable a default profile, and to keep # any profile installed and maintained by users themselves. profile="/etc/apparmor.d/usr.sbin.mariadbd" if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then if grep -q /usr/sbin/mariadbd "$profile" 2>/dev/null ; then apparmor_parser -r "$profile" || true else echo "/usr/sbin/mariadbd { }" | apparmor_parser --remove 2>/dev/null || true fi fi # @TODO: Remove once buildbot.askmonty.org has been updated not to expect this file mkdir -p /etc/systemd/system/mariadb.service.d/ # Note that file cannot be empty, otherwise systemd version in Ubuntu Bionic # will think the service is masked echo "# empty placeholder" > /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf ;; abort-upgrade|abort-remove|abort-configure) ;; triggered) if [ -x "$(command -v systemctl)" ]; then systemctl daemon-reload else invoke-rc.d mariadb restart fi ;; *) echo "postinst called with unknown argument '$1'" 1>&2 exit 1 ;; esac + case "$1" in + set +e + invoke-rc.d mariadb stop + set -e + '[' -f /etc/init.d/mysql ']' + mysql_statedir=/usr/share/mysql + mysql_datadir=/var/lib/mysql + mysql_logdir=/var/log/mysql + mysql_cfgdir=/etc/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + for dir in DATADIR LOGDIR + '[' DATADIR = DATADIR ']' + targetdir=/var/lib/mysql + savelink=/var/lib/mysql-upgrade/DATADIR.link + '[' -L /var/lib/mysql-upgrade/DATADIR.link ']' + rmdir /var/lib/mysql-upgrade + for dir in DATADIR LOGDIR + '[' LOGDIR = DATADIR ']' + targetdir=/var/log/mysql + savelink=/var/lib/mysql-upgrade/LOGDIR.link + '[' -L /var/lib/mysql-upgrade/LOGDIR.link ']' + rmdir /var/lib/mysql-upgrade + true + '[' '!' -d /usr/share/mysql ']' + '[' '!' -d /var/lib/mysql ']' + '[' '!' -d /var/log/mysql ']' + '[' '!' -L /var/log/mysql ']' + mkdir -Z /var/log/mysql + set +e + chown -R 0:0 /usr/share/mysql + xargs -0 -r chown mysql ++ id -u mysql + find /var/lib/mysql '!' -uid 110 -print0 + chown -R mysql:adm /var/log/mysql + chmod 2750 /var/log/mysql + set -e + chmod 0700 /usr/lib/mysql/plugin/auth_pam_tool_dir + chmod 04755 /usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool + chown mysql /usr/lib/mysql/plugin/auth_pam_tool_dir + db_set mariadb-server/postrm_remove_database false + _db_cmd 'SET mariadb-server/postrm_remove_database' false + _db_internal_IFS=' ' + IFS=' ' + printf '%s\n' 'SET mariadb-server/postrm_remove_database false' + IFS=' ' + read -r _db_internal_line + IFS=' ' + RET='10 mariadb-server/postrm_remove_database doesn'\''t exist' + case ${_db_internal_line%%[ ]*} in + return 10 + true + rm -f '/var/lib/mysql/debian-*.flag' + touch /var/lib/mysql/debian-10.5.flag + set +e + logger -p daemon.err -t mariadb-server-10.5.postinst -i + bash /usr/bin/mysql_install_db --rpm --cross-bootstrap --user=mysql --disable-log-bin --skip-test-db + set -e + touch /usr/share/mysql/debian-10.5.flag + dc=/etc/mysql/debian.cnf + '[' '!' -d /etc/mysql ']' + '[' '!' -e /etc/mysql/debian.cnf ']' + cat /dev/null + echo '# Automatically generated for Debian scripts. DO NOT TOUCH!' + chown 0:0 /etc/mysql/debian.cnf + chmod 0600 /etc/mysql/debian.cnf + profile=/etc/apparmor.d/usr.sbin.mariadbd + '[' -f /etc/apparmor.d/usr.sbin.mariadbd ']' + aa-status --enabled + mkdir -p /etc/systemd/system/mariadb.service.d/ + echo '# empty placeholder' db_stop # in case invoke failes + db_stop + echo STOP # dh_systemd_start doesn't emit anything since we still ship /etc/init.d/mariadb. # Thus MariaDB server is started via init.d script, which in turn redirects to # systemctl. If we upgrade from MySQL mysql.service may be masked, which also # means init.d script is disabled. Unmask mysql service explicitly. # Check first that the command exists, to avoid emitting any warning messages. if [ -x "$(command -v deb-systemd-helper)" ]; then deb-systemd-helper unmask mysql.service > /dev/null fi ++ command -v deb-systemd-helper + '[' -x /usr/bin/deb-systemd-helper ']' + deb-systemd-helper unmask mysql.service # Automatically added by dh_systemd_enable/12.10ubuntu1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'mariadb.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'mariadb.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'mariadb.service' >/dev/null || true else # Update the statefile to add new symlinks (if any), which need to be # cleaned up on purge. Also remove old symlinks. deb-systemd-helper update-state 'mariadb.service' >/dev/null || true fi fi + '[' configure = configure ']' + deb-systemd-helper unmask mariadb.service + deb-systemd-helper --quiet was-enabled mariadb.service + deb-systemd-helper enable mariadb.service Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /lib/systemd/system/mariadb.service. # End automatically added section # Automatically added by dh_systemd_enable/12.10ubuntu1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if deb-systemd-helper debian-installed 'mariadb.service'; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'mariadb.service' >/dev/null || true if deb-systemd-helper --quiet was-enabled 'mariadb.service'; then # Create new symlinks, if any. deb-systemd-helper enable 'mariadb.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper update-state 'mariadb.service' >/dev/null || true fi + '[' configure = configure ']' + deb-systemd-helper debian-installed mariadb.service + deb-systemd-helper unmask mariadb.service + deb-systemd-helper --quiet was-enabled mariadb.service + deb-systemd-helper enable mariadb.service + deb-systemd-helper update-state mariadb.service # End automatically added section # Automatically added by dh_installinit/12.10ubuntu1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -x "/etc/init.d/mariadb" ]; then update-rc.d mariadb defaults 19 21 >/dev/null || exit 1 fi fi + '[' configure = configure ']' + '[' -x /etc/init.d/mariadb ']' + update-rc.d mariadb defaults 19 21 # End automatically added section # Modified dh_systemd_start snippet that's not added automatically if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true deb-systemd-invoke start mariadb.service >/dev/null || true # Modified dh_installinit snippet to only run with sysvinit elif [ -x "/etc/init.d/mariadb" ]; then if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then invoke-rc.d mariadb start || exit $? fi fi + '[' -d /run/systemd/system ']' + systemctl --system daemon-reload + deb-systemd-invoke start mariadb.service Setting up mariadb-server (1:10.5.5+maria~focal) ... Setting up libdbd-mariadb-perl (1.11-3ubuntu2) ... Setting up libhtml-parser-perl (3.72-5) ... Setting up libhttp-message-perl (6.22-1) ... Setting up libcgi-pm-perl (4.46-1) ... Setting up libhtml-template-perl (2.97-1) ... Setting up libcgi-fast-perl (1:2.15-1) ... Processing triggers for systemd (245.4-4ubuntu3) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9) ... root@web3:~# systemctl status mariadb.service ● mariadb.service - MariaDB 10.5.5 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: active (running) since Tue 2020-09-22 08:38:44 UTC; 1min 50s ago Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ Main PID: 1749 (mariadbd) Status: "Taking your SQL requests now..." Tasks: 9 (limit: 4915) Memory: 79.2M CGroup: /system.slice/mariadb.service └─1749 /usr/sbin/mariadbd Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: mysql Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: performance_schema Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: Phase 6/7: Checking and upgrading tables Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: Processing databases Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: information_schema Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: performance_schema Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: Phase 7/7: Running 'FLUSH PRIVILEGES' Sep 22 08:38:50 web3 /etc/mysql/debian-start[1771]: OK Sep 22 08:38:50 web3 /etc/mysql/debian-start[2733]: Checking for insecure root accounts. Sep 22 08:38:50 web3 /etc/mysql/debian-start[2737]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables root@web3:~# uname -a Linux web3 4.15.18-30-pve #1 SMP PVE 4.15.18-58 (Fri, 12 Jun 2020 13:53:01 +0200) x86_64 x86_64 x86_64 GNU/Linux root@web3:~# more /etc/apt/sources.list deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse