Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

-1 votes
2 answers
265 views
I am unable to install MySQL on any of my Debian servers. How do I get the signature to the repo?
I am trying to install `mysql-server` on my Debian servers. I am following the documentation at `dev.mysql.com`. 1. I start in /tmp/. 2. I get wget https://dev.mysql.com/get/mysql-apt-config_0.8.30-1_all.deb. 3. I dpkg -i the file i just downloaded. 4. I do the config setting. 5. sudo apt update. Th...
I am trying to install mysql-server on my Debian servers. I am following the documentation at dev.mysql.com. 1. I start in /tmp/. 2. I get wget https://dev.mysql.com/get/mysql-apt-config_0.8.30-1_all.deb . 3. I dpkg -i the file i just downloaded. 4. I do the config setting. 5. sudo apt update. The error:
Err:1 http://repo.mysql.com/apt/debian  buster InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
Reading package lists... Done
W: GPG error: http://repo.mysql.com/apt/debian  buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
E: The repository 'http://repo.mysql.com/apt/debian  buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
6. pro forma sudo apt install mysql-server, the error: No installation candidate. This must be the hundredth time I've done this in my life. Why is this suddenly not working?
7fc9ecfc6810c58545e1bc3b556003
Sep 4, 2024, 02:19 PM • Last activity: Jul 8, 2025, 06:04 AM
0 votes
1 answers
169 views
Mysql 8, Query on user table garbles terminal. Is this an Installation issue?
I have Mytsql 8.0.1 Community Edition installed on Debian 10.1 Preparing to restore some dump files, I'm attempting to get a remote connection and cannot ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111 "Connection refused") I was attempting to look at users and see what was there...
I have Mytsql 8.0.1 Community Edition installed on Debian 10.1 Preparing to restore some dump files, I'm attempting to get a remote connection and cannot ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111 "Connection refused") I was attempting to look at users and see what was there and got this: mysql> select user, host from mysql.user; +------------------+-----------+ | user | host | +------------------+-----------+ | root | % | | root | tuivhk | | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------+ 6 rows in set (0.01 sec) mysql> select user, host, authentication_string from mysql.user; +------------------+-----------+------------------------------------------------------------------------+ | user | host | authentication_string | +------------------+-----------+------------------------------------------------------------------------+ | root | % | $A$005$sH ~m%:G'{a*wGdR.BP9eON1eqM95YlN.1CJB6YeiQbiQ7l33i.wZuD | | root | tuivhk | $A$005$=BLI-+,?)~5,Zh0QZAK-aX/a+N++a+/8BS|+IX+++1+gO/0++Y60y_8ZA | | +y_-+.i+f-_che+a | +-ca+h-_+ | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | +y_-+._e__i-+ | +-ca+h-_+ | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | +y_-+._y_ | +-ca+h-_+ | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | _--+ | +-ca+h-_+ | $A$005$d(+?aM^81^GZO+|Mg++Zdga4_Da-|UefKWXgyhBB++.DD+RYYDMDG__-+EA | +------------------+-----------+------------------------------------------------------------------------+ 6 _-+_ i+ _e+ (0.00 _ec) +y_-+> I could use some assistance figuring out what went wrong here.
Ken Ingram (181 rep)
Oct 3, 2019, 05:35 AM • Last activity: Jul 2, 2025, 11:07 PM
4 votes
2 answers
959 views
Specific changes to glibc 2.28 that affect PostgreSQL
I am preparing for upgrading a PostgreSQL server to Debian 10 (Buster) with the warning from Debian [release notes][1] about changes to gclibc affecting PostgreSQL in mind. The [PostgreSQL wiki][2] provides two specific strings that will be sorted differently under `LC_COLLATE=en_US.UTF-8` with glib...
I am preparing for upgrading a PostgreSQL server to Debian 10 (Buster) with the warning from Debian release notes about changes to gclibc affecting PostgreSQL in mind. The PostgreSQL wiki provides two specific strings that will be sorted differently under LC_COLLATE=en_US.UTF-8 with glibc versions prior to 2.28 (i.e. up to Debian 9) or from 2.28 (i.e. from Debian 10) respectively. ( echo "1-1"; echo "11" ) | LC_COLLATE=en_US.UTF-8 sort # 11 1-1 under Debian 9 ( echo "1-1"; echo "11" ) | LC_COLLATE=en_US.UTF-8 sort # 1-1 11 under Debian 10 From this warning I have been expecting that similar problems occur with many string patterns. In order to better understand this I have created a table test with 1 million rows of random samples, i.e. each primary key is a string permutation of lower case letters, digits, hyphens and German umlauts. There are two additional rows that hold the two special strings 11 and 1-1. When I dump this table with SELECT * FROM test ORDER BY key \g test.out from a database with encoding UTF8 and collation en_US.UTF-8 under Debian 9 and Debian 10 respectively what I observe is that the sort order only differs with respect to the two special strings. All the other (random) strings don't seem to be affected. This makes me wonder what is the precise nature of changes to locale en_US (en_US.UTF-8) in glibc 2.28. Does it only concern the relative order between - and digits (and nothing else)? Where does the package source code reveal the exact difference (URL into GitHub, or similar)?
rookie099 (368 rep)
Jan 30, 2020, 09:05 AM • Last activity: Jun 26, 2025, 04:07 AM
4 votes
2 answers
108 views
In Debian/Ubuntu, what are the exact SQL commands to run to create a new database and user for your app after running `apt install mariadb-server`?
In Debian/Ubuntu, after running `apt install mariadb-server` there is only a `root` user in the database, and one can only log in locally with e.g. `sudo mariadb` using socket authentication as root. To actually use MariaDB for an app, one needs to create a new database, and a new user for the app a...
In Debian/Ubuntu, after running apt install mariadb-server there is only a root user in the database, and one can only log in locally with e.g. sudo mariadb using socket authentication as root. To actually use MariaDB for an app, one needs to create a new database, and a new user for the app and grant it permissions for the database. Additionally, if app is running on a remote host, one needs to allow MariaDB to accept connections over the network, and the user configuration needs to be aligned with it allowing remote connections. What are the exact SQL commands and/or /etc/mysql/mariadb.conf.d/*.cnf configs a sysadmin should put in place with a freshly installed MariaDB server instance?
Otto (469 rep)
May 24, 2025, 07:33 PM • Last activity: Jun 7, 2025, 07:13 AM
1 votes
1 answers
267 views
Run out of disc space on Debian server due to postgresql database
I recently run out of disc space no my server due to implementing some audit tools on Postgresql database. Two tables holding data about changes made by users quickly reached 16GB each, and totally filled 40GB server. I've checked size of this tables by command in PGAdmin4: ```SQL SELECT relname as...
I recently run out of disc space no my server due to implementing some audit tools on Postgresql database. Two tables holding data about changes made by users quickly reached 16GB each, and totally filled 40GB server. I've checked size of this tables by command in PGAdmin4:
SELECT
   relname as "Table",
   pg_size_pretty(pg_total_relation_size(relid)) As "Size",
   pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
   FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
Following that, I deleted these two tables to save space, but despite that I haven't actually recovered any disc space. I run df and du commands in debian to check disc usage:
root@vps673587:/home/maciejzak# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        40G   36G  2.4G  94% /
udev             10M     0   10M   0% /dev
tmpfs           774M   81M  694M  11% /run
tmpfs           1.9G  8.0K  1.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           387M     0  387M   0% /run/user/1003
tmpfs           387M     0  387M   0% /run/user/1001


root@vps673587:/home/maciejzak# sudo du -sh /*
8.9M    /bin
72M     /boot
8.0K    /dev
7.0M    /etc
92M     /home
0       /initrd.img
0       /initrd.img.old
537M    /lib
4.0K    /lib64
16K     /lost+found
8.0K    /media
4.0K    /mnt
4.0K    /opt
du: cannot access ‘/proc/10127/task/10127/fd/4’: No such file or directory
du: cannot access ‘/proc/10127/task/10127/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/10127/fd/4’: No such file or directory
du: cannot access ‘/proc/10127/fdinfo/4’: No such file or directory
0       /proc
124K    /root
81M     /run
4.9M    /sbin
12K     /srv
0       /sys
44K     /tmp
968M    /usr
3.6G    /var
0       /vmlinuz
0       /vmlinuz.old
So as you can see, 94% (36GB) on sda1 is used. Meanwhile only 3,6 GB is actually used on /var. What happened with rest of that disc space? I've run lsof command:
root@vps673587:/home/maciejzak#  lsof | grep -i deleted
sudo       2529            root    0u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
sudo       2529            root    1u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
sudo       2529            root    2u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
proftpd    2530            root    0u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
proftpd    2530            root    1u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
proftpd    2530            root    2u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
proftpd    2530            root   10r      REG                8,1       5262      29171 /etc/init.d/proftpd (deleted)
systemctl  2540            root    0u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
systemctl  2540            root    1u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
systemctl  2540            root    2u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
systemd-t  2541            root    0u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
systemd-t  2541            root    1u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
systemd-t  2541            root    2u      CHR              136,0        0t0          3 /dev/pts/0 (deleted)
postgres   8927        postgres   19u      REG                8,1      24576     262826 /var/lib/postgresql/10/main/base/18036/68886_fsm (deleted)
postgres   8927        postgres   58u      REG                8,1          0     263332 /var/lib/postgresql/10/main/base/18036/68886 (deleted)
postgres   8927        postgres   59u      REG                8,1       8192     263850 /var/lib/postgresql/10/main/base/18036/68886_vm (deleted)
postgres   8927        postgres   60u      REG                8,1          0     263783 /var/lib/postgresql/10/main/base/18036/68894 (deleted)
postgres   8927        postgres   61u      REG                8,1          0     263782 /var/lib/postgresql/10/main/base/18036/68893 (deleted)
postgres   8927        postgres   62u      REG                8,1    4251648     263049 /var/lib/postgresql/10/main/base/18036/68889_fsm (deleted)
postgres   8927        postgres   64u      REG                8,1    4251648     263320 /var/lib/postgresql/10/main/base/18036/69116_fsm (deleted)
postgres   8927        postgres   65u      REG                8,1      24576     262943 /var/lib/postgresql/10/main/base/18036/69110_fsm (deleted)
postgres   8927        postgres   66u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   8927        postgres   67u      REG                8,1       8192     263851 /var/lib/postgresql/10/main/base/18036/69110_vm (deleted)
postgres   8927        postgres   68u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   8927        postgres   69u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   8927        postgres   70u      REG                8,1   16777216     263791 /var/lib/postgresql/10/main/pg_wal/000000010000000B0000003A (deleted)
postgres   8927        postgres   72u      REG                8,1          0     263759 /var/lib/postgresql/10/main/base/18036/68891 (deleted)
postgres   8927        postgres   73u      REG                8,1          0     263781 /var/lib/postgresql/10/main/base/18036/68892 (deleted)
postgres   8927        postgres   74u      REG                8,1          0     263340 /var/lib/postgresql/10/main/base/18036/68889 (deleted)
postgres   8927        postgres   75u      REG                8,1 1073741824     263822 /var/lib/postgresql/10/main/base/18036/68889.1 (deleted)
postgres   8927        postgres   76u      REG                8,1 1073741824     263824 /var/lib/postgresql/10/main/base/18036/68889.2 (deleted)
postgres   8927        postgres   77u      REG                8,1 1073741824     263826 /var/lib/postgresql/10/main/base/18036/68889.3 (deleted)
postgres   8927        postgres   78u      REG                8,1 1073741824     263828 /var/lib/postgresql/10/main/base/18036/68889.4 (deleted)
postgres   8927        postgres   79u      REG                8,1 1073741824     263831 /var/lib/postgresql/10/main/base/18036/68889.5 (deleted)
postgres   8927        postgres   80u      REG                8,1 1073741824     263834 /var/lib/postgresql/10/main/base/18036/68889.6 (deleted)
postgres   8927        postgres   81u      REG                8,1 1073741824     263838 /var/lib/postgresql/10/main/base/18036/68889.7 (deleted)
postgres   8927        postgres   82u      REG                8,1 1073741824     263841 /var/lib/postgresql/10/main/base/18036/68889.8 (deleted)
postgres   8927        postgres   83u      REG                8,1 1073741824     263844 /var/lib/postgresql/10/main/base/18036/68889.9 (deleted)
postgres   8927        postgres   84u      REG                8,1 1073741824     263847 /var/lib/postgresql/10/main/base/18036/68889.10 (deleted)
postgres   8927        postgres   85u      REG                8,1          0     263308 /var/lib/postgresql/10/main/base/18036/69118 (deleted)
postgres   8927        postgres   86u      REG                8,1          0     263085 /var/lib/postgresql/10/main/base/18036/68896 (deleted)
postgres   8927        postgres   87u      REG                8,1          0     263305 /var/lib/postgresql/10/main/base/18036/69116 (deleted)
postgres   8927        postgres   88u      REG                8,1 1073741824     263823 /var/lib/postgresql/10/main/base/18036/69116.1 (deleted)
postgres   8927        postgres   89u      REG                8,1 1073741824     263825 /var/lib/postgresql/10/main/base/18036/69116.2 (deleted)
postgres   8927        postgres   90u      REG                8,1 1073741824     263827 /var/lib/postgresql/10/main/base/18036/69116.3 (deleted)
postgres   8927        postgres   91u      REG                8,1 1073741824     263829 /var/lib/postgresql/10/main/base/18036/69116.4 (deleted)
postgres   8927        postgres   92u      REG                8,1 1073741824     263832 /var/lib/postgresql/10/main/base/18036/69116.5 (deleted)
postgres   8927        postgres   93u      REG                8,1 1073741824     263835 /var/lib/postgresql/10/main/base/18036/69116.6 (deleted)
postgres   8927        postgres   94u      REG                8,1 1073741824     263839 /var/lib/postgresql/10/main/base/18036/69116.7 (deleted)
postgres   8927        postgres   95u      REG                8,1 1073741824     263842 /var/lib/postgresql/10/main/base/18036/69116.8 (deleted)
postgres   8927        postgres   96u      REG                8,1 1073741824     263845 /var/lib/postgresql/10/main/base/18036/69116.9 (deleted)
postgres   8927        postgres   97u      REG                8,1 1073741824     263848 /var/lib/postgresql/10/main/base/18036/69116.10 (deleted)
postgres   8927        postgres   99u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
postgres   8927        postgres  100u      REG                8,1 1073741824     263016 /var/lib/postgresql/10/main/base/18036/68889.11 (deleted)
postgres   8927        postgres  101u      REG                8,1 1073741824     263074 /var/lib/postgresql/10/main/base/18036/69116.11 (deleted)
postgres   8927        postgres  102u      REG                8,1 1073741824     263020 /var/lib/postgresql/10/main/base/18036/68889.12 (deleted)
postgres   8927        postgres  103u      REG                8,1 1073741824     263113 /var/lib/postgresql/10/main/base/18036/69116.12 (deleted)
postgres   8927        postgres  104u      REG                8,1 1073741824     263082 /var/lib/postgresql/10/main/base/18036/68889.13 (deleted)
postgres   8927        postgres  105u      REG                8,1 1073741824     263133 /var/lib/postgresql/10/main/base/18036/69116.13 (deleted)
postgres   8927        postgres  106u      REG                8,1 1073741824     263131 /var/lib/postgresql/10/main/base/18036/68889.14 (deleted)
postgres   8927        postgres  107u      REG                8,1 1073741824     263136 /var/lib/postgresql/10/main/base/18036/69116.14 (deleted)
postgres   8927        postgres  108u      REG                8,1 1073741824     259461 /var/lib/postgresql/10/main/base/18036/68889.15 (deleted)
postgres   8927        postgres  109u      REG                8,1 1073741824     263153 /var/lib/postgresql/10/main/base/18036/69116.15 (deleted)
postgres   8927        postgres  110u      REG                8,1   50221056     263135 /var/lib/postgresql/10/main/base/18036/68889.16 (deleted)
postgres   8927        postgres  111u      REG                8,1   49745920     263155 /var/lib/postgresql/10/main/base/18036/69116.16 (deleted)
postgres   9058        postgres   78u      REG                8,1      24576     262826 /var/lib/postgresql/10/main/base/18036/68886_fsm (deleted)
postgres   9058        postgres   79u      REG                8,1          0     263332 /var/lib/postgresql/10/main/base/18036/68886 (deleted)
postgres   9058        postgres   80u      REG                8,1       8192     263850 /var/lib/postgresql/10/main/base/18036/68886_vm (deleted)
postgres   9058        postgres   81u      REG                8,1          0     263781 /var/lib/postgresql/10/main/base/18036/68892 (deleted)
postgres   9058        postgres   82u      REG                8,1          0     263782 /var/lib/postgresql/10/main/base/18036/68893 (deleted)
postgres   9058        postgres   83u      REG                8,1          0     263783 /var/lib/postgresql/10/main/base/18036/68894 (deleted)
postgres   9058        postgres   84u      REG                8,1          0     263085 /var/lib/postgresql/10/main/base/18036/68896 (deleted)
postgres   9058        postgres   85u      REG                8,1      24576     262943 /var/lib/postgresql/10/main/base/18036/69110_fsm (deleted)
postgres   9058        postgres   86u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   9058        postgres   87u      REG                8,1       8192     263851 /var/lib/postgresql/10/main/base/18036/69110_vm (deleted)
postgres   9058        postgres   88u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   9058        postgres   89u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   9058        postgres   90u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
postgres   9058        postgres   91u      REG                8,1   16777216     263313 /var/lib/postgresql/10/main/pg_wal/000000010000000B000000E8 (deleted)
postgres   9087        postgres  106u      REG                8,1          0     263332 /var/lib/postgresql/10/main/base/18036/68886 (deleted)
postgres   9087        postgres  107u      REG                8,1          0     263781 /var/lib/postgresql/10/main/base/18036/68892 (deleted)
postgres   9087        postgres  108u      REG                8,1          0     263782 /var/lib/postgresql/10/main/base/18036/68893 (deleted)
postgres   9087        postgres  109u      REG                8,1          0     263783 /var/lib/postgresql/10/main/base/18036/68894 (deleted)
postgres   9087        postgres  110u      REG                8,1          0     263085 /var/lib/postgresql/10/main/base/18036/68896 (deleted)
postgres   9087        postgres  111u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   9087        postgres  112u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   9087        postgres  113u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   9087        postgres  114u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
postgres   9500        postgres   56u      REG                8,1          0     263332 /var/lib/postgresql/10/main/base/18036/68886 (deleted)
postgres   9500        postgres   57u      REG                8,1          0     263781 /var/lib/postgresql/10/main/base/18036/68892 (deleted)
postgres   9500        postgres   58u      REG                8,1          0     263782 /var/lib/postgresql/10/main/base/18036/68893 (deleted)
postgres   9500        postgres   59u      REG                8,1          0     263783 /var/lib/postgresql/10/main/base/18036/68894 (deleted)
postgres   9500        postgres   60u      REG                8,1          0     263085 /var/lib/postgresql/10/main/base/18036/68896 (deleted)
postgres   9500        postgres   62u      REG                8,1          0     263759 /var/lib/postgresql/10/main/base/18036/68891 (deleted)
postgres   9500        postgres   63u      REG                8,1          0     263340 /var/lib/postgresql/10/main/base/18036/68889 (deleted)
postgres   9500        postgres   64u      REG                8,1 1073741824     263822 /var/lib/postgresql/10/main/base/18036/68889.1 (deleted)
postgres   9500        postgres   65u      REG                8,1 1073741824     263824 /var/lib/postgresql/10/main/base/18036/68889.2 (deleted)
postgres   9500        postgres   66u      REG                8,1 1073741824     263826 /var/lib/postgresql/10/main/base/18036/68889.3 (deleted)
postgres   9500        postgres   67u      REG                8,1 1073741824     263828 /var/lib/postgresql/10/main/base/18036/68889.4 (deleted)
postgres   9500        postgres   68u      REG                8,1 1073741824     263831 /var/lib/postgresql/10/main/base/18036/68889.5 (deleted)
postgres   9500        postgres   69u      REG                8,1 1073741824     263834 /var/lib/postgresql/10/main/base/18036/68889.6 (deleted)
postgres   9500        postgres   70u      REG                8,1 1073741824     263838 /var/lib/postgresql/10/main/base/18036/68889.7 (deleted)
postgres   9500        postgres   71u      REG                8,1 1073741824     263841 /var/lib/postgresql/10/main/base/18036/68889.8 (deleted)
postgres   9500        postgres   72u      REG                8,1 1073741824     263844 /var/lib/postgresql/10/main/base/18036/68889.9 (deleted)
postgres   9500        postgres   73u      REG                8,1 1073741824     263847 /var/lib/postgresql/10/main/base/18036/68889.10 (deleted)
postgres   9500        postgres   74u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   9500        postgres   75u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   9500        postgres   76u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   9500        postgres   77u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
postgres   9500        postgres   80u      REG                8,1       8192     263851 /var/lib/postgresql/10/main/base/18036/69110_vm (deleted)
postgres   9500        postgres   81u      REG                8,1          0     263308 /var/lib/postgresql/10/main/base/18036/69118 (deleted)
postgres   9500        postgres   82u      REG                8,1          0     263305 /var/lib/postgresql/10/main/base/18036/69116 (deleted)
postgres   9500        postgres   83u      REG                8,1 1073741824     263823 /var/lib/postgresql/10/main/base/18036/69116.1 (deleted)
postgres   9500        postgres   84u      REG                8,1 1073741824     263825 /var/lib/postgresql/10/main/base/18036/69116.2 (deleted)
postgres   9500        postgres   85u      REG                8,1 1073741824     263827 /var/lib/postgresql/10/main/base/18036/69116.3 (deleted)
postgres   9500        postgres   86u      REG                8,1 1073741824     263829 /var/lib/postgresql/10/main/base/18036/69116.4 (deleted)
postgres   9500        postgres   87u      REG                8,1 1073741824     263832 /var/lib/postgresql/10/main/base/18036/69116.5 (deleted)
postgres   9500        postgres   88u      REG                8,1 1073741824     263835 /var/lib/postgresql/10/main/base/18036/69116.6 (deleted)
postgres   9500        postgres   89u      REG                8,1 1073741824     263839 /var/lib/postgresql/10/main/base/18036/69116.7 (deleted)
postgres   9500        postgres   90u      REG                8,1 1073741824     263842 /var/lib/postgresql/10/main/base/18036/69116.8 (deleted)
postgres   9500        postgres   91u      REG                8,1 1073741824     263845 /var/lib/postgresql/10/main/base/18036/69116.9 (deleted)
postgres   9500        postgres   92u      REG                8,1 1073741824     263848 /var/lib/postgresql/10/main/base/18036/69116.10 (deleted)
postgres   9573        postgres   31u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   9573        postgres   32u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   9573        postgres   33u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   9573        postgres   34u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
postgres   9589        postgres   22u      REG                8,1          0     262940 /var/lib/postgresql/10/main/base/18036/69110 (deleted)
postgres   9589        postgres   23u      REG                8,1          0     263336 /var/lib/postgresql/10/main/base/18036/69119 (deleted)
postgres   9589        postgres   24u      REG                8,1          0     263341 /var/lib/postgresql/10/main/base/18036/69120 (deleted)
postgres   9589        postgres   25u      REG                8,1          0     263342 /var/lib/postgresql/10/main/base/18036/69121 (deleted)
It seems that a lot of space is still used up by (deleted) files from Postgres database. How can I free that disc space?
Addas (11 rep)
Jul 30, 2019, 11:50 AM • Last activity: May 20, 2025, 06:03 PM
0 votes
1 answers
270 views
Date missing from timestamp in mysql log
Currently, my log entries look like: time | message --|-- 03:53:08 PM | ERROR 05:40:32 PM | ERROR ... | ... I want the date included, like this: time | message --|-- 06/30/2022 03:53:08 PM | ERROR 06/30/2022 05:40:32 PM | ERROR ... | ... My global variables: ``` SHOW GLOBAL VARIABLES LIKE '%log%' ``...
Currently, my log entries look like: time | message --|-- 03:53:08 PM | ERROR 05:40:32 PM | ERROR ... | ... I want the date included, like this: time | message --|-- 06/30/2022 03:53:08 PM | ERROR 06/30/2022 05:40:32 PM | ERROR ... | ... My global variables:
SHOW GLOBAL VARIABLES LIKE '%log%'
| Variable_name | Value | |----------------------------|-------------------| | binlog_format | MIXED | | date_format | %Y-%m-%d | | datetime_format | %Y-%m-%d %H:%i:%s | | default_week_format | 0 | | innodb_default_row_format | dynamic | | innodb_file_format | | | mysql56_temporal_format | ON | | time_format | %H:%i:%s | My DBMS version: @@version is 10.5.15-MariaDB-0+deb11u1
Asher (11 rep)
Jul 20, 2022, 10:53 PM • Last activity: May 14, 2025, 04:06 AM
0 votes
1 answers
1206 views
Mysqld draining memory, using way more then assigned and not giving any back
This is a production server. Whenever mysqld is restarted the memory consumption slowly builds up to about 75 to 90% of my total memory (while only 8 out of 32GB is allocated to mysqld). Sometimes this takes 5 hours, sometimes this takes 16 hours. Usually it sticks around that percentage for a good...
This is a production server. Whenever mysqld is restarted the memory consumption slowly builds up to about 75 to 90% of my total memory (while only 8 out of 32GB is allocated to mysqld). Sometimes this takes 5 hours, sometimes this takes 16 hours. Usually it sticks around that percentage for a good amount of hours. If that was just it it would be fine, but after some time it then starts using even more memory, Until it overflows, causing my 32GB swap drive to fill up to 100% sometimes. Now things start to rapidly slow down to a crawl with mostly timeouts. It does recover after some time to the point it will no longer timeout for a while, but the memory never frees up so its constantly on the verge of dropping out again. Anyone have an insight on how can this be? Why is mysqld using so much memory and not returning any free mem? And why is it not respecting at all the buffer limits that were set? I have played around for some time with the mariadb.conf, but even reverting all back to default doesn’t seem to have much impact on the memory usage. **Running** mysqld Ver 10.3.27-MariaDB-0+deb10u1 **top stats** mysql 20 0 33.2g 25.1g 3760 S 521.6 80.1 1122:26 mysqld **Memory/buffer specs from mysql tuner** [--] Physical Memory : 31.3G [--] Max MySQL memory : 8.0G [--] Other process memory: 1.4G [--] Total buffers: 7.5G global + 2.9M per thread (151 max threads) [--] P_S Max memory usage: 104M [--] Global Buffers [--] +-- Key Buffer: 128.0M [--] +-- Max Tmp Table: 256.0M [--] Query Cache Buffers [--] +-- Query Cache: OFF - DISABLED [--] +-- Query Cache Size: 0B [--] Per Thread Buffers [--] +-- Read Buffer: 128.0K [--] +-- Read RND Buffer: 256.0K [--] +-- Sort Buffer: 2.0M [--] +-- Thread stack: 292.0K [--] +-- Join Buffer: 256.0K **Mariadb conf** skip-name-resolve performance_schema = ON query_cache_type = 0 query_cache_size = 0 tmp_table_size = 256M max_heap_table_size = 256M innodb_log_files_in_group = 4 innodb_buffer_pool_size = 7G innodb_status_file #extra reporting innodb_file_per_table #enable always innodb_flush_log_at_trx_commit = 2 #2/0 = perf, 1 = ACID innodb_table_locks = 0 innodb_lock_wait_timeout = 60 innodb_thread_concurrency = 24 innodb_commit_concurrency = 2 innodb_log_file_size = 384M innodb_buffer_pool_instances = 7
dotSpokane (1 rep)
Apr 14, 2021, 02:23 AM • Last activity: May 9, 2025, 05:05 PM
79 votes
6 answers
253682 views
Disable MySQL binary logging with log_bin variable
Default MySQL config file /etc/mysql/my.cnf installed by some debian package using APT often set log_bin variable, so binlog are enabled: log_bin = /var/log/mysql/mysql-bin.log When I want to disable binary logging on such installation, comment out the line in my.cnf works of course, but I wonder if...
Default MySQL config file /etc/mysql/my.cnf installed by some debian package using APT often set log_bin variable, so binlog are enabled: log_bin = /var/log/mysql/mysql-bin.log When I want to disable binary logging on such installation, comment out the line in my.cnf works of course, but I wonder if there is a way to disable binary logging by setting explicitely log_bin to OFF, in a debian style, I mean in an included file like /etc/mysql/conf.d/myCustomFile.cnf, so default my.cnf is not changed and can be easily updated by apt, if necessary. I tried "log_bin = 0", "log_bin = OFF" or "log_bin =" but none works...
Nicolas Payart (2508 rep)
Jul 30, 2014, 04:01 PM • Last activity: Mar 27, 2025, 08:21 PM
0 votes
2 answers
570 views
unknown variable 'file-key-management-filename'
New installation of Debian 10, with MariaDB 10.3.29. Trying to set up encryption-at-rest, but MariaDB won't start due to an error... ``` [ERROR] /usr/sbin/mysqld: unknown variable 'file-key-management-filename=/etc/openssl/keys/keyfile.key' ``` My server.cnf has... ``` [mariadb-10.3] plugin-load-add...
New installation of Debian 10, with MariaDB 10.3.29. Trying to set up encryption-at-rest, but MariaDB won't start due to an error...
[ERROR] /usr/sbin/mysqld: unknown variable 'file-key-management-filename=/etc/openssl/keys/keyfile.key'
My server.cnf has...
[mariadb-10.3]
plugin-load-add = file_key_management
file_key_management_filename = /etc/openssl/keys/keyfile.key
file_key_management_encryption_algorithm = AES_CTR
The above config I have working in a Centos7 system, so I'm baffled as to why it isn't working on Debian10. This message is what I encountered when trying to install encryption in a MariaDB pre-10.1 version that didn't have encryption as an option, but I know encryption is an option after Mariadb 10.1, so it should be available in this package (unexciting installation via apt), right? I have tried moving the cnf code around, to the [mysqld] and [mariadb] sections to no avail. There are no previous versions of MariaDB hanging around - this is a clean install. Has anyone encountered this issue and solved it already?
Stephen (11 rep)
Jul 17, 2021, 01:50 AM • Last activity: Mar 22, 2025, 08:29 AM
4 votes
1 answers
5337 views
InnoDB: Error: Table “mysql”.“mysql.transaction_registry” not found after upgrade to mariadb 10.3
I've upgraded the `mariadb` to `10.3` packages on my Debian 10, however something went wrong and I ended in the same issue which is mentioned several times - [Cannot open table mysql/innodb_index_stats [duplicate]][1] - [InnoDB: Error: Table “mysql”.“innodb_table_stats” not found after upgrade to my...
I've upgraded the mariadb to 10.3 packages on my Debian 10, however something went wrong and I ended in the same issue which is mentioned several times - [Cannot open table mysql/innodb_index_stats [duplicate]][1] - InnoDB: Error: Table “mysql”.“innodb_table_stats” not found after upgrade to mysql 5.6 - InnoDB: Error: Table “mysql”.“innodb_table_stats” not found - MySQL > Table doesn't exist. But it does (or it should) - mysql error: Table “mysql”.“innodb_table_stats” not found So in my case you can see mysql_upgrade complains of missing tables although they seem to exist
$ sudo mysql_upgrade -u root --force -pxxxxx
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.index_stats                                  OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.slave_master_info                            OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry
Error    : Table 'mysql.transaction_registry' doesn't exist in engine
status   : Operation failed
mysql.user                                         OK

Repairing tables
mysql.transaction_registry
Error    : Table 'mysql.transaction_registry' doesn't exist in engine
status   : Operation failed
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1813 (HY000) at line 77: Tablespace for table 'mysql.innodb_table_stats' exists. Please DISCARD the tablespace before IMPORT
ERROR 1813 (HY000) at line 81: Tablespace for table 'mysql.innodb_index_stats' exists. Please DISCARD the tablespace before IMPORT
ERROR 1813 (HY000) at line 153: Tablespace for table 'mysql.gtid_slave_pos' exists. Please DISCARD the tablespace before IMPORT
ERROR 1146 (42S02) at line 639: Table 'mysql.innodb_index_stats' doesn't exist
ERROR 1243 (HY000) at line 640: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1146 (42S02) at line 642: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1243 (HY000) at line 643: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1146 (42S02) at line 647: Table 'mysql.innodb_index_stats' doesn't exist
ERROR 1146 (42S02) at line 651: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1146 (42S02) at line 654: Table 'mysql.innodb_table_stats' doesn't exist
FATAL ERROR: Upgrade failed
However the tables are there
MariaDB [mysql]> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| column_stats              |
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| index_stats               |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| roles_mapping             |
| servers                   |
| slave_master_info         |
| slave_relay_log_info      |
| slave_worker_info         |
| slow_log                  |
| table_stats               |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| transaction_registry      |
| user                      |
+---------------------------+
31 rows in set (0.005 sec)
As non-db expert and althought some of the posts mentioned above are old, I followed them trying to solve the problem 1. Stop mariadb with sudo systemctl stop mariadb 2. Delete files
cd /var/lib
    sudo rm mysql/ibdata1
    sudo rm mysql/ib_logfile0
    sudo rm mysql/ib_logfile1
    sudo rm mysql/mysql/innodb_index_stats.ibd
    sudo rm mysql/mysql/innodb_table_stats.ibd
    sudo rm mysql/mysql/gtid_slave_pos.frm
    sudo rm mysql/mysql/gtid_slave_pos.ibd
    sudo rm mysql/mysql/slave_master_info.frm
    sudo rm mysql/mysql/slave_master_info.ibd 
    sudo rm mysql/mysql/slave_worker_info.frm
    sudo rm mysql/mysql/slave_worker_info.ibd
    sudo rm mysql/mysql/slave_relay_log_info.frm
    sudo rm mysql/mysql/slave_relay_log_info.ibd
3. Start mariadb with sudo systemctl start mariadb 4. Open mysql using mysql -u root -p 5. Recreate tables for mariadb 10
CREATE TABLE gtid_slave_pos (
    domain_id int(10) unsigned NOT NULL,
    sub_id bigint(20) unsigned NOT NULL,
    server_id int(10) unsigned NOT NULL,
    seq_no bigint(20) unsigned NOT NULL,
    PRIMARY KEY (domain_id,sub_id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Replication slave GTID state';

    CREATE TABLE innodb_index_stats (
    database_name varchar(64) COLLATE utf8_bin NOT NULL,
    table_name varchar(64) COLLATE utf8_bin NOT NULL,
    index_name varchar(64) COLLATE utf8_bin NOT NULL,
    last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    stat_name varchar(64) COLLATE utf8_bin NOT NULL,
    stat_value bigint(20) unsigned NOT NULL,
    sample_size bigint(20) unsigned DEFAULT NULL,
    stat_description varchar(1024) COLLATE utf8_bin NOT NULL,
    PRIMARY KEY (database_name,table_name,index_name,stat_name)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

    CREATE TABLE innodb_table_stats (
    database_name varchar(64) COLLATE utf8_bin NOT NULL,
    table_name varchar(64) COLLATE utf8_bin NOT NULL,
    last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    n_rows bigint(20) unsigned NOT NULL,
    clustered_index_size bigint(20) unsigned NOT NULL,
    sum_of_other_index_sizes bigint(20) unsigned NOT NULL,
    PRIMARY KEY (database_name,table_name)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

    CREATE TABLE slave_master_info (
    Number_of_lines int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',
    Master_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',
    Master_log_pos bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',
    Host char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'The host name of the master.',
    User_name text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',
    User_password text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',
    Port int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',
    Connect_retry int(10) unsigned NOT NULL COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',
    Enabled_ssl tinyint(1) NOT NULL COMMENT 'Indicates whether the server supports SSL connections.',
    Ssl_ca text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',
    Ssl_capath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',
    Ssl_cert text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',
    Ssl_cipher text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',
    Ssl_key text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',
    Ssl_verify_server_cert tinyint(1) NOT NULL COMMENT 'Whether to verify the server certificate.',
    Heartbeat float NOT NULL,
    Bind text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',
    Ignored_server_ids text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored, followed by the actual server IDs',
    Uuid text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',
    Retry_count bigint(20) unsigned NOT NULL COMMENT 'Number of reconnect attempts, to the master, before giving up.',
    Ssl_crl text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',
    Ssl_crlpath text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',
    Enabled_auto_position tinyint(1) NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',
    PRIMARY KEY (Host,Port)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information';

    CREATE TABLE slave_relay_log_info (
    Number_of_lines int(10) unsigned NOT NULL COMMENT 'Number of lines in the file or rows in the table. Used to version table definitions.',
    Relay_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the current relay log file.',
    Relay_log_pos bigint(20) unsigned NOT NULL COMMENT 'The relay log position of the last executed event.',
    Master_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',
    Master_log_pos bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last executed event.',
    Sql_delay int(11) NOT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',
    Number_of_workers int(10) unsigned NOT NULL,
    Id int(10) unsigned NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',
    PRIMARY KEY (Id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information';

    CREATE TABLE slave_worker_info (
    Id int(10) unsigned NOT NULL,
    Relay_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
    Relay_log_pos bigint(20) unsigned NOT NULL,
    Master_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
    Master_log_pos bigint(20) unsigned NOT NULL,
    Checkpoint_relay_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
    Checkpoint_relay_log_pos bigint(20) unsigned NOT NULL,
    Checkpoint_master_log_name text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
    Checkpoint_master_log_pos bigint(20) unsigned NOT NULL,
    Checkpoint_seqno int(10) unsigned NOT NULL,
    Checkpoint_group_size int(10) unsigned NOT NULL,
    Checkpoint_group_bitmap blob NOT NULL,
    PRIMARY KEY (Id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information';
However situation got worse:
$ sudo mysql_upgrade -u root --force -pxxxx
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.gtid_slave_pos                               OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.index_stats                                  OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.slave_relay_log_info                         OK
mysql.slave_worker_info                            OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry
Error    : Table 'mysql.transaction_registry' doesn't exist in engine
status   : Operation failed
mysql.user                                         OK

Repairing tables
mysql.transaction_registry
Error    : Table 'mysql.transaction_registry' doesn't exist in engine
status   : Operation failed
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Phase 6/7: Checking and upgrading tables
Processing databases
information_schema
nc
nc.oc_accounts
Error    : Table 'nc.oc_accounts' doesn't exist in engine
status   : Operation failed
nc.oc_activity
Error    : Table 'nc.oc_activity' doesn't exist in engine
status   : Operation failed
nc.oc_activity_mq
...
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
What can I do? Not only are there errors with mysql-tables but also all others.
papanito (153 rep)
Jan 18, 2020, 06:51 PM • Last activity: Feb 24, 2025, 05:02 AM
2 votes
1 answers
2895 views
Can't enable wal2json in postgres 12 docker image
I'm trying to enable wal2json in an image extended from `postgres:12` image. But i'm getting an error: ``` postgres=# create extension wal2json; ERROR: could not open extension control file "/usr/share/postgresql/12/extension/wal2json.control": No such file or directory ``` This might be because wal...
I'm trying to enable wal2json in an image extended from postgres:12 image. But i'm getting an error:
postgres=# create extension wal2json;
ERROR:  could not open extension control file "/usr/share/postgresql/12/extension/wal2json.control": No such file or directory
This might be because wal2json is also missing from pg_available_extensions:
postgres=# select * from pg_available_extensions where name ilike '%%json%%';
 name | default_version | installed_version | comment 
------+-----------------+-------------------+---------
(0 rows)
Dockerfile:
FROM postgres:12
RUN apt update && apt install -y postgresql-12-wal2json postgresql-contrib
postgres server logs:
db_1  | 2020-05-10 13:53:04.611 GMT  LOG:  database system is ready to accept connections
db_1  | 2020-05-10 13:54:03.587 GMT  ERROR:  could not open extension control file "/usr/share/postgresql/12/extension/wal2json.control": No such file or directory
db_1  | 2020-05-10 13:54:03.587 GMT  STATEMENT:  create extension wal2json;
the postgresql.conf file has been tweaked to
wal_level = logical		
shared_preload_libraries = 'wal2json'
Any help with getting this working will be appreciated.
Ayush (123 rep)
May 10, 2020, 02:12 PM • Last activity: Feb 9, 2025, 05:18 AM
0 votes
1 answers
43 views
Automating upgrades with Ansible, fighting with APT auto-starting Cassandra service
I'm preparing to upgrade nodes from 3.11.17 to 4.1.7. I've done the upgrade successfully by hand with some dev nodes, but I am wanting to make this more repeatable with Ansible. I am running on Ubuntu servers, so I have to fight with apt auto starting the service. Wondering what would be the most ko...
I'm preparing to upgrade nodes from 3.11.17 to 4.1.7. I've done the upgrade successfully by hand with some dev nodes, but I am wanting to make this more repeatable with Ansible. I am running on Ubuntu servers, so I have to fight with apt auto starting the service. Wondering what would be the most kosher process of doing these upgrades without apt tossing default files at me and possibly messing stuff up. My thoughts are: 1. drain and stop one node 2. Template in my necessary cassandra.yaml and rack properties files 3. Do the install of cassandra 4.1.7 4. Cope with apt auto starting cassandra Does this spell disaster? My data isn't in the default path of the config that comes from the package maintainer (/var/lib/cassandra), and some of my config variables are no longer present in 4.1 so I would expect cassandra to crash on startup, seeing the unrecognized variables (which I came across with my dev tests). What I would REALLY like is to install cassandra and give it a good look over before starting, but I am not afforded that luxury. In numerous tests, stopping cassandra immediately after a successful install did not work, cassandra would persist.
stratacast1 (43 rep)
Jan 18, 2025, 12:47 AM • Last activity: Jan 20, 2025, 03:20 AM
2 votes
2 answers
5226 views
pg_createcluster - Error: cluster configuration already exists
Wow! I seem to be stuck in the 9th level of pg wrapper command hell... On Debian, have been trying to delete cluster 'main' (in order to recreate using appropriate locales and other options...) After a bit of futzing, am getting these responses from wrapper tools: $ pg_createcluster 9.4 main Error:...
Wow! I seem to be stuck in the 9th level of pg wrapper command hell... On Debian, have been trying to delete cluster 'main' (in order to recreate using appropriate locales and other options...) After a bit of futzing, am getting these responses from wrapper tools: $ pg_createcluster 9.4 main Error: cluster configuration already exists ( seems reasonable - it does! ) $ pg_dropcluster 9.4 main Error: Invalid data directory OK, but which data directory? The 'main' cluster dir is there, intact - correct permissions... What do these tools read to get these configurations? How to drop 'main' and start afresh?
DrLou (121 rep)
Apr 3, 2017, 02:50 PM • Last activity: Jan 10, 2025, 08:47 AM
1 votes
1 answers
841 views
Mariadb replication - Ignore users changes
I posted this question on ServerFault but was told to ask it here. I need to set up multi-source replication (3 masters and 1 slave). I'd like to avoid replicating users' changes on the slave because it breaks replication. I've followed this : https://serverfault.com/questions/865487/mysql-replicati...
I posted this question on ServerFault but was told to ask it here. I need to set up multi-source replication (3 masters and 1 slave). I'd like to avoid replicating users' changes on the slave because it breaks replication. I've followed this : https://serverfault.com/questions/865487/mysql-replication-failing-on-mysql-user-changes but it didn't seem to work. I've tried different configurations but none works. - Ignore table mysql on the slave :
replicate_ignore_db=mysql
- Ignore table mysql for each connection on the slave:
master1.replicate_ignore_db=mysql
master2.replicate_ignore_db=mysql
master3.replicate_ignore_db=mysql
- Ignore the mysql table in the master's binlog :
binlog-ignore-db=mysql
I'm working with Mariadb 10.6 on Debian 9. The master's binlog format is ROW. I'm still getting errors in the replication regarding users changes. How can I make the replication ignore the users' changes ?
Ror (131 rep)
Jan 11, 2022, 11:36 AM • Last activity: Dec 30, 2024, 09:06 AM
0 votes
2 answers
1740 views
What to do when MySQL is not generating any logs at all on Debian?
The problem I'm having is that MySQL (5.5.46-0+deb7u1) is not generating log files. This on Debian Wheezy. The my.cfg file has been updated according to the required config for logging ALL queries (as per http://www.microhowto.info/howto/log_all_queries_to_a_mysql_server.html). It's not writing to t...
The problem I'm having is that MySQL (5.5.46-0+deb7u1) is not generating log files. This on Debian Wheezy. The my.cfg file has been updated according to the required config for logging ALL queries (as per http://www.microhowto.info/howto/log_all_queries_to_a_mysql_server.html) . It's not writing to the specified location, nor to the default location. Mysql errors are also not being logged, as far as I can tell. EDIT: my.cnf is here: http://pastie.org/private/q9vwgihslpenc94mxmyyiw EDIT: Here's the output of "show variables like '%warn%';": +---------------+-------+ | Variable_name | Value | +---------------+-------+ | log_warnings | 1 | | sql_warnings | OFF | | warning_count | 0 | +---------------+-------+
geoidesic (111 rep)
Nov 16, 2015, 04:54 PM • Last activity: Dec 25, 2024, 11:01 PM
2 votes
1 answers
656 views
Unable to enter characters in MariaDB
I have just switched from MySQL to MariaDB and am running into a very silly problem: I cannot enter any extended characters in the database (for example, ö ä or å). The system is utf8, and I tried switching the keyboard to swedish — works everywhere except for mariadb prompt, and even...
I have just switched from MySQL to MariaDB and am running into a very silly problem: I cannot enter any extended characters in the database (for example, ö ä or å). The system is utf8, and I tried switching the keyboard to swedish — works everywhere except for mariadb prompt, and even tried copying and pasting from gucharmap — nothing is pasted at prompt. Either method worked under MySQL in the past. I looked in MariaDB conf.d, the character_set_system was not set so I changed it to utf8, but that did not help. default-character-set in 50-client.cnf is set to utf8mb4. Any ideas? System: debian bulseye/sid Mariadb: Ver 15.1 Distrib 10.5.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper These are the relevant mariadb variables:
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |

| character_set_results | utf8mb4 |

| character_set_server | utf8mb4 |

| character_set_system | utf8 |

| character_sets_dir | /usr/share/mysql/charsets/ |

| collation_connection | utf8mb4_general_ci |

| collation_database | utf8mb4_general_ci |

| collation_server | utf8mb4_general_ci |

| session_track_system_variables | 
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
--- show create table gives
ENGINE=InnoDB AUTO_INCREMENT=1625 DEFAULT CHARSET=utf8mb4
The rest are field definitions, and no collations are set. Of course, there is a prompt: it is a standard mysql prompt. I am not sure how to make it clearer. I am at mysql prompt. In the past, typing something like å worked fine, now it shows nothing. When I try to paste the character copied from another utility like gucharmap, nothing is pasted. When I paste "normal" characters (i.e. standard English text) everything works. Note that the extended characters in database entries created BEFORE the switch show up just fine. Yes, it is all very mysterious.
jorgon (21 rep)
May 15, 2021, 02:51 PM • Last activity: Dec 25, 2024, 06:07 AM
2 votes
0 answers
1974 views
Repmgr: Error to promote Standby Cluster to Master Cluster in failover
I maked the configuration of the failover system based in [Repmgr][1], but i don't haved success to promote the Standby Cluster to Master Cluster in case of failover. Following my configurations, this process shoulded happens automatically, but does not works. Additional Information: - Debian 9.2, P...
I maked the configuration of the failover system based in Repmgr , but i don't haved success to promote the Standby Cluster to Master Cluster in case of failover. Following my configurations, this process shoulded happens automatically, but does not works. Additional Information: - Debian 9.2, PostgresSQL 9.6, Repmgr 3.3 - IP Master (host1): 10.0.0.1, IP Standby (host2): 10.0.0.2 - Contents included in /etc/postgresql/9.6/main/postgresql.conf, the same for all wal_keep_segments = 5000 hot_standby = on archive_mode = on listen_addresses = '*' max_wal_senders = 18 wal_level = hot_standby shared_preload_libraries = 'repmgr_funcs' archive_command = 'cd .' - Contents of /etc/postgresql/9.6/main/pg_hba.conf ####Master local all postgres peer local all all peer host all all 127.0.0.1/32 trust host all all ::1/128 md5 host repmgr repmgr 10.0.0.2/32 trust host replication repmgr 10.0.0.2/32 trust ####Standby local all postgres peer local all all peer host all all 127.0.0.1/32 trust host all all ::1/128 md5 host repmgr repmgr 10.0.0.1/32 trust host replication repmgr 10.0.0.1/32 trust - Contents of /etc/repmgr.conf ####Master cluster=cluster node=1 node_name=host1 conninfo='host=host1 user=repmgr dbname=repmgr connect_timeout=2' failover=automatic promote_command='repmgr standby promote -f /etc/repmgr.conf --log-to-file' follow_command='repmgr standby follow -f /etc/repmgr.conf --log-to-file' logfile='/var/log/postgresql/repmgr.log' loglevel=NOTICE reconnect_attempts=4 reconnect_interval=5 ####Standby cluster=cluster node=2 node_name=host2 conninfo='host=host2 user=repmgr dbname=repmgr connect_timeout=2' failover=automatic promote_command='repmgr standby promote -f /etc/repmgr.conf --log-to-file' follow_command='repmgr standby follow -f /etc/repmgr.conf --log-to-file' logfile='/var/log/postgresql/repmgr.log' loglevel=NOTICE reconnect_attempts=4 reconnect_interval=5 - Contents included in /etc/default/repmgrd, the same for all REPMGRD_ENABLED=yes REPMGRD_CONF="/etc/repmgr.conf" - Result of repmgr cluster show command postgres@host1:~$ repmgr cluster show Role | Name | Upstream | Connection String ----------+--------|----------|-------------------------------------------------------- * master | host1 | | host=host1 user=repmgr dbname=repmgr connect_timeout=2 standby | host2 | host1 | host=host2 user=repmgr dbname=repmgr connect_timeout=2 - Error found in log file (/var/log/postgresql/repmgr.log) when executing command "repmgrd" [ERROR] unable to retrieve record for node 1: ERROR: relation "repmgr_cluster.repl_nodes" does not exist LINE 1: ...onninfo, slot_name, priority, active FROM "repmgr_cl... Complete Tutorial: https://medium.com/@victor.boissiere/how-to-setup-postgresql-cluster-with-repmgr-febc2f10c243
Alessandro Cardoso (21 rep)
Sep 6, 2018, 03:32 PM • Last activity: Nov 26, 2024, 08:04 PM
0 votes
0 answers
38 views
Wal-G an indexes
I'm migrating a PostgreSQL 15 database using wal-g. After migration, everything seems to work as expected except for a unique constraint that's not being honored until I rebuild the index. The constraint is unique, composite (varchar, int) and it specifies NULLS NOT DISTINCT. OS are different, but c...
I'm migrating a PostgreSQL 15 database using wal-g. After migration, everything seems to work as expected except for a unique constraint that's not being honored until I rebuild the index. The constraint is unique, composite (varchar, int) and it specifies NULLS NOT DISTINCT. OS are different, but collation is the same. Queries to text/bigint index seems to work. My understanding was that wal-g performed "physical replication" so I shouldn't be having this issue. What could it be wrong?
csjr (1 rep)
Sep 19, 2024, 05:21 PM
2 votes
1 answers
467 views
How to Backup and Restore a MariaDB database with Master and Slave replication configured?
I have a MariaDB Master and Slave server setup for replication. Both MariaDB servers are in the same datacenter and local network. I want to do at least a daily full backup and incremental every 15 minutes. Data changes the most between 6am ET and to 1am ET the following day. I use InnoDB storage en...
I have a MariaDB Master and Slave server setup for replication. Both MariaDB servers are in the same datacenter and local network. I want to do at least a daily full backup and incremental every 15 minutes. Data changes the most between 6am ET and to 1am ET the following day. I use InnoDB storage engine. From the research I've done so far, mariabackup is what can do full and incremental backups. Do I perform the full and incremental backup from the master or slave? How can I prevent locking the database from writes so my webapp can still be used during backups?
SkipTripAhead (21 rep)
Aug 10, 2024, 11:02 AM • Last activity: Aug 11, 2024, 09:46 PM
0 votes
1 answers
32 views
How do I provide a custom Cassandra configuration for Debian package installation?
When doing a "apt install cassandra", Cassandra will start as a service with a default configuration. Isn't there a way to provide a custom configuration, so that the service will start with the desired configuration, or install with service in stopped mode? It seems a bit silly to have to stop serv...
When doing a "apt install cassandra", Cassandra will start as a service with a default configuration. Isn't there a way to provide a custom configuration, so that the service will start with the desired configuration, or install with service in stopped mode? It seems a bit silly to have to stop service, change configuration, delete /var/lib/cassandra/* and finally restart service.
lbor (1 rep)
Jun 15, 2023, 09:46 PM • Last activity: May 15, 2024, 01:05 PM
Showing page 1 of 20 total questions