0

We use Plesk, for our sins.

We have updated MariaDB from 10.5 to 10.11.14 and now all websites on the server that previously connected on "localhost" are coming back with:

SQLSTATE[HY000] [2002] Permission denied

The only online details we can find for this issue relate to remote connection with bad details, but our connections are all localhost only. We have changed the passwords via the Plesk interface to be the same as the user connection details but they still give Permission Denied on the websites.

Plesk interface and PhpMyAdmin still connect ok.

How do we resolve this?

UPDATE:

Our IDE states:

DBMS: MariaDB (no ver.) Case sensitivity: plain=mixed, delimited=exact Socket fail to connect to host:address=(host=localhost)(port=3306) (type=primary). Connection refused.

This is using SSH Tunnelling to the Server.
Again, this worked before the update. How can we resolve this?

1 Answer 1

0

I think I've found an answer.

(There are bunch of other issues going on on this server due to this MariaDB update)

But the answer is that SELinux doesn't have the correct identifier as per this bug here:

https://jira.mariadb.org/browse/MDEV-24941

And someone has commented here some command line workaround solutions to the issue:

~#: sudo semanage fcontext -a -t mysqld_exec_t /usr/sbin/mariadbd 
~#: sudo restorecon -Rv /usr/sbin/mariadbd

This has got PHP communicating with the MariaDB SQL again.

NOTE: This seems to also need any IDE connection to re-establish, with re-entered credentials. This may be something to do with the update itself than the bug with SELinux.

3
  • The mysql-selinux-1.0.14 package on RHEL/Fedora/CentosStream should have the correct fcontext for /usr/sbin/mariadbd now. PHP connecting seems more likely is the fcontext of the MariaDB socket. IDE reconnection, could be denial cache - not sure. Commented Oct 29 at 4:46
  • @danblack the system it is on is AlmaLinux 9 Commented Oct 29 at 11:27
  • Seems there too. A relabel not occuring on an open file perhaps? (ref rhbz#2395701) Commented Oct 30 at 1:55

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.