When running mariadb-setpermission it fails to connect to MariaDB. On line 89 (in MariaDB 10.5.4) it tries to connect using port/host and mariadb_socket, and all three of these cannot be used together. You get the error:
Can't make a connection to the mysql server.
The error: Connection error: host or port cannot be specified together with mariadb_socket at /usr/bin/mariadb-setpermission line 89, <STDIN> line 1.