MySQL, MariaDB, PGSQL access error

So, after upgrading to mariadb end of July ( Update & upgrade error due to mariadb repo issue ) I have been having issues connecting and granting/having access to any database, irrespective of the user (localhost, root, user1-2-3 etc). I am not sure what to do, as I cannot use apps to install which require this database. The error extends to Postgresql as well, unfortunately.

ls -la /etc/mysql/
total 40
drwxr-xr-x 4 root root 4096 Aug 7 16:05 .
drwxr-xr-x 127 root root 12288 Sep 15 10:20 ..
drwxr-xr-x 2 root root 4096 Nov 20 2024 conf.d
-rw------- 1 root root 544 Nov 20 2024 debian.cnf
-rwxr-xr-x 1 root root 1770 May 19 22:06 debian-start
-rw-r–r-- 1 root root 1126 Aug 5 19:59 mariadb.cnf
drwxr-xr-x 3 root root 4096 Aug 7 16:08 mariadb.conf.d
lrwxrwxrwx 1 root root 11 Jul 29 01:23 my.cnf → mariadb.cnf
-rw-r–r-- 1 root root 839 Oct 20 2020 my.cnf.fallback

ls -la /etc/postgresql
total 20
drwxr-xr-x 3 postgres postgres 4096 Nov 20 2024 .
drwxr-xr-x 127 root root 12288 Sep 15 10:20 ..
drwxr-xr-x 3 postgres postgres 4096 Nov 20 2024 17

I am literally stuck like anything here.