Topic: phpMyAdmin - AVC errors due to change in phpMyAdmin configuration

Hi,
After updating centos 7 to 8 (with unnofial but working method...), I could not login to my phpMyAdmin.
I've got the message like : "mysqli::real_connect(): (HY000/2002): Permission denied".

Looking to /var/log/audit log, i'm getting AVC errors :

type=AVC  avc:  denied  { name_connect } ... mysqld_port_t s0 tclass=tcp_socket permissive=0

After googling, one solution could to modify selinux booleans to allow httpd remot connect, but from my side will be only a workaround. Should be a better solution.
It seems that php-fpm consider now the server as a remote and not a local one.
So i've checked configuration file.

I saw that i have a /phpMyAdmin/config inc php and /phpMyAdmin/config inc php rpmsave (created during the update).
In the rpmsave config file, the default (local one) server is configured like this :

/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

In the new configuration file :

/* Server parameters */
$cfg['Servers'][$i]['host'] = '127 0 0 1';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

So i've just replaced 127 0 0 1 by localhost and it solved the problem.

So i've just replaced by localhost and it solved the problem.

I've checked upstream (github code), in the example file, the server is configured with localhost so probel should be during rpm build.

Nota : what a pain, post is restricted to only 1 link, but automatically detect links... where it should not. Hard to write this message i had to remove many dots//parts of message.

Re: phpMyAdmin - AVC errors due to change in phpMyAdmin configuration

The default provided configuration use "localhost"...

> Nota : what a pain, post is restricted to only 1 link, but automatically detect links... where it should not. Hard to write this message i had to remove many dots//parts of message.

Sorry but allow to reduce (a lot) spams

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 32 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: phpMyAdmin - AVC errors due to change in phpMyAdmin configuration

Ok, i will deeply check files / compare backups to try to understadand why i've got the local loop adress. Whatever is the reason, i'll go back with the answer smile

For links limitations, i totally understand. But maybe deactivating phpBB auto link could help for user (no way to tell it it's not a link).