Not sure to post on the right StackExchange forum. If not, let me know!
Working environment:
- OpenSUSE Leap 15.4
- MariaDB : mariadb Ver 15.1 Distrib 10.7.7-MariaDB
- PHP 8.0.25 (cli) (built: Oct 31 2022 12:00:00) ( NTS )
Based on phpinfo(), PHP ini file is: /etc/php8/cli/php.ini
.
phpMyAdmin 5.1 is working well. Installation directory is: /usr/share/phpMyAdmin
(default directory created when installing via zypper install phpMyAdmin
command).
The "famous" option $cfg['Servers'][$i]['host']
from /etc/phpMyAdmin/config.inc.php
file is set to localhost
(and it does work!).
I have then upgraded phpMyAdmin version this way:
srv-bla:~ # mv /usr/share/phpMyAdmin /usr/share/phpMyAdmin.old
srv-bla:~ # mkdir /usr/share/phpMyAdmin
srv-bla:~ # wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.tar.gz
srv-bla:~ # tar -xzf phpMyAdmin-5.2.0-all-languages.tar.gz
srv-bla:~ # mv phpMyAdmin-5.2.0-all-languages/* /usr/share/phpMyAdmin/
I then restart daemons and test the connection:
srv-bla:~ # systemctl restart mysqld mariadb apache2
The connection page is showing right. I then enter my credentials and I get stuck with this bloody message:
Impossible to connect to server.
mysqli::real_connect(): (HY000/2002): No such file or directory
I have wandered for a while on numerous webpages. Many of them suggest to modify the config.inc.php
file and to set $cfg['Servers'][$i]['host']
option to 127.0.0.1
instead of localhost
. Unfortunately, this does not fix the problem for me...
Am I editing the right config.inc.php
file? Actually, I can find only one on the server:
srv-bla:~ # updatedb
srv-bla:~ # locate config.inc.php
/etc/phpMyAdmin/config.inc.php
/etc/phpMyAdmin/config.inc.php.rpmnew
/etc/phpMyAdmin/config.inc.php.rpmsave
Apache logs are not friendly either. Access logs returns 200 codes only, which seems normal to me (the phpMyAdmin webpage is served properly). Error logs are empty...
Mysql logs are empty also (/var/log/mysql/mysqld.log
).
Or course, I have check that mysqld
service (same as mariadb
service) is running.
Any help or ideas would be much appreciated!
EDIT
The socket file from MariaDB point of view is:
srv-bla:~ # mariadb -u root -p
Enter password:
MariaDB [(none)]> \s
[...]
UNIX socket: /var/lib/mysql/mysql.sock
[...]
The php.ini file is configured the same way:
srv-bla:~ # cat /etc/php8/cli/php.ini | grep mysqli.default_socket
mysqli.default_socket = /var/lib/mysql/mysql.sock
To me, there is no socket issue...