[opensuse] phpMyAdmin fails to install and run as supplied by OpenSuSE.
Ha! I am going to surprise the reader because I already know of a temporary solution to get phpMyAdmin to work, and I know that it is going to be part of the real solution, however it is going to get resolved. I just don't grok how to report it (it is a bug), I don't know what package has the responsibility for this issue, (phpMyAdmin or Mariadb) and the solution I have only works until the computer is rebooted. So I am going to need some real guidance here from a guru... In a nutshell, as currently packaged, phpMyAdmin will NOT come up and work on OpenSuSE Leap 15.0, out of the box, as described in so many LAMP articles posted around the internet, including the ones posted by/for OpenSuSE Leap 15.0. When MariaDB/MySQL is installed, it sets up a bunch of stuff, including an all important socket in the directory /var/lib/mysql. However, by default, phpMyAdmin appears to be expecting this stuff to be installed at /var/run/mysql. /var/run is a temporary directory that gets reconstructed each time the system is booted up. I can "fix" this by creating a link i.e. - ln -s /var/lib/mysql /var/run/mysql but this is only a temporary solution and gets wiped out on reboot. (I am still looking for a possible means of configuring phpMyAdmin with the knowledge it needs to find the MariaDB stuff.) And for the curious, if one tries to bring up phpMyAdmin without this link, one is going to get an absolutely horrid error message that has people all over the internet scratching around looking for a solution. The error is - "mysqli_real_connect(): (HY000/2002): No such file or directory" Yeah I have seen bad error messages before but the guy who came up with this dozy needs to be shot and retired from the software development game! And for a real brain twist take a look at the solutions/suggestions people are coming up with, that often do not work at all. In my case it took a hell of a lot of detective work to get as far as I have, but at least I found the &*$#&! problem! Now all I need is a good persistent solution and perhaps help with getting it reported in a way that the developers will comprehend. I vaguely remember coming up with a way to create a persistent directory in /var/run a couple years ago but not sure what I did nor if it is applicable to creating a persistent link instead. Thanks in advance for help and ideas... Marc... (sorry for the colorful remarks, it is LATE at night and I am tired!) -- <b>Computers: the final frontier. These are the voyages of the user Marc.<br> His mission: to explore strange new hardware. To seek out new software and new applications.<br> To boldly go where no Marc has gone before!<br></b> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
W dniu 08.05.2019 o 08:06, Marc Chamberlin pisze:
Ha! I am going to surprise the reader because I already know of a temporary solution to get phpMyAdmin to work, and I know that it is going to be part of the real solution, however it is going to get resolved. I just don't grok how to report it (it is a bug), I don't know what package has the responsibility for this issue, (phpMyAdmin or Mariadb) and the solution I have only works until the computer is rebooted. So I am going to need some real guidance here from a guru...
In a nutshell, as currently packaged, phpMyAdmin will NOT come up and work on OpenSuSE Leap 15.0, out of the box, as described in so many LAMP articles posted around the internet, including the ones posted by/for OpenSuSE Leap 15.0. When MariaDB/MySQL is installed, it sets up a bunch of stuff, including an all important socket in the directory /var/lib/mysql. However, by default, phpMyAdmin appears to be expecting this stuff to be installed at /var/run/mysql. /var/run is a temporary directory that gets reconstructed each time the system is booted up. I can "fix" this by creating a link i.e. - ln -s /var/lib/mysql /var/run/mysql but this is only a temporary solution and gets wiped out on reboot. (I am still looking for a possible means of configuring phpMyAdmin with the knowledge it needs to find the MariaDB stuff.)
And for the curious, if one tries to bring up phpMyAdmin without this link, one is going to get an absolutely horrid error message that has people all over the internet scratching around looking for a solution. The error is - "mysqli_real_connect(): (HY000/2002): No such file or directory" Yeah I have seen bad error messages before but the guy who came up with this dozy needs to be shot and retired from the software development game! And for a real brain twist take a look at the solutions/suggestions people are coming up with, that often do not work at all. In my case it took a hell of a lot of detective work to get as far as I have, but at least I found the &*$#&! problem!
Now all I need is a good persistent solution and perhaps help with getting it reported in a way that the developers will comprehend. I vaguely remember coming up with a way to create a persistent directory in /var/run a couple years ago but not sure what I did nor if it is applicable to creating a persistent link instead.
Thanks in advance for help and ideas... Marc... (sorry for the colorful remarks, it is LATE at night and I am tired!)
I think it's a bug in phpMyAdmin package. It should be patched to have correct path to mysql socket.
Marc Chamberlin wrote:
In a nutshell, as currently packaged, phpMyAdmin will NOT come up and work on OpenSuSE Leap 15.0, out of the box, as described in so many LAMP articles posted around the internet, including the ones posted by/for OpenSuSE Leap 15.0.
FWIW, I have phpmyadmin running on Leap15.0, apache 2.4.33, php 7.2.5, mpm_itk. The machine is overdue for an update though. I don't remember needing to do anything special, but it's been about a year. (I'm not a fan of pma, but I had a customer who was unable to work with ssh and the mysql cli). We installed the latest package from the web, not from the openSUSE repos. I'm happy to compare notes, I'll some comments below.
When MariaDB/MySQL is installed, it sets up a bunch of stuff, including an all important socket in the directory /var/lib/mysql. However, by default, phpMyAdmin appears to be expecting this stuff to be installed at /var/run/mysql.
I see mariadb listening on /run/mysql/mysql.sock, with /var/run being a symlink to /run. I believe that is the default.
/var/run is a temporary directory that gets reconstructed each time the system is booted up. I can "fix" this by creating a link i.e. - ln -s /var/lib/mysql /var/run/mysql but this is only a temporary solution and gets wiped out on reboot. (I am still looking for a possible means of configuring phpMyAdmin with the knowledge it needs to find the MariaDB stuff.)
Specifying server = localhost when you log in ought to suffice. In our "config.inc.php" I also see: $cfg['Servers'][$i]['host'] = 'localhost'; and we also have $cfg['AllowArbitraryServer']=true; $cfg['ArbitraryServerRegexp'] = '/^mysql.srv[0-9]+.example.com$/';
And for the curious, if one tries to bring up phpMyAdmin without this link, one is going to get an absolutely horrid error message that has people all over the internet scratching around looking for a solution.
Hmm, I use datadir = /srv/mysql instead of the default /var/lib/mysql. Shouldn't really matter much.
Thanks in advance for help and ideas... Marc... (sorry for the colorful remarks, it is LATE at night and I am tired!)
We've all been there, got a lack of hair to prove it. :-) How about posting your 'config.inc.php' from phpmyadmin? (the salient bits only) - I'll install phpmyadmin from our repos and see what it looks like. -- Per Jessen, Zürich (9.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
How about posting your 'config.inc.php' from phpmyadmin? (the salient bits only) - I'll install phpmyadmin from our repos and see what it looks like.
I've installed phpMyadmin on leap 15.1, I see no mention of mysql.sock anywhere in the code, nor in /etc/phpMyAdmin/config.inc.php . I do see see 'connect_type=socket', so maybe there is a client default somewhere. /etc/php7/apache2/php.ini: ; Default socket name for local MySQL connects. If empty, uses ; the built-in MySQL defaults. ; http://php.net/mysqli.default-socket mysqli.default_socket = I don't know what the builtin MySQL defaults might be - presumably they come from /etc/my.cnf - where I also only see the default as "/run/mysql/mysql.sock". -- Per Jessen, Zürich (11.7°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 5/8/19 1:11 AM, Per Jessen wrote:
Marc Chamberlin wrote:
In a nutshell, as currently packaged, phpMyAdmin will NOT come up and work on OpenSuSE Leap 15.0, out of the box, as described in so many LAMP articles posted around the internet, including the ones posted by/for OpenSuSE Leap 15.0. FWIW, I have phpmyadmin running on Leap15.0, apache 2.4.33, php 7.2.5, mpm_itk. The machine is overdue for an update though. I don't remember needing to do anything special, but it's been about a year.
(I'm not a fan of pma, but I had a customer who was unable to work with ssh and the mysql cli).
Hi Pers, and thanks as always for replying. I don't know why nobody else seems to be having any trouble with phpMyAdmin because I have now failed identically on two different systems. Maybe I am just doing something wrong consistently, but I tried to follow the sets exactly for LAMP systems and don't have any trouble until I reach the step of trying to use phpMyAdmin to actually log in and connect with my MariaDB server. So I will try to fill in some of the details and perhaps you or some other set of eyes will spot why it is that the only way I can get phpMyAdmin to work is to manually create a link from /var/run/mysql to /var/lib/mysql. # uname -a Linux quasar 4.12.14-lp150.12.58-default #1 SMP Mon Apr 1 15:20:46 UTC 2019 (58fcc15) x86_64 x86_64 x86_64 GNU/Linux # cat /etc/os-release NAME="openSUSE Leap" VERSION="15.0" ID="opensuse-leap" ... # httpd -v Server version: Apache/2.4.33 (Linux/SUSE) Server built: 2019-04-04 12:22:32.000000000 +0000 # php --version PHP 7.2.5 (cli) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies # mysql --version mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Linux (x86_64) using readline 5.1 I don't have mpm_itk installed but a quick Google search shows me that it is probably something I would be very interested in. I cannot find it in the YaST repositories however... I am not a fan of PMA either, but I don't always get to make the requirements either...
We installed the latest package from the web, not from the openSUSE repos. I'm happy to compare notes, I'll some comments below.
Hmmmmmm
When MariaDB/MySQL is installed, it sets up a bunch of stuff, including an all important socket in the directory /var/lib/mysql. However, by default, phpMyAdmin appears to be expecting this stuff to be installed at /var/run/mysql. I see mariadb listening on /run/mysql/mysql.sock, with /var/run being a symlink to /run. I believe that is the default.
# netstat -l | grep mysql tcp 0 0 0.0.0.0:mysql 0.0.0.0:* LISTEN unix 2 [ ACC ] STREAM LISTENING 4178857 /var/lib/mysql/mysql.sock Nope, for me mysql seems to be listening on port 3306 on all interfaces (I will restrict it to just my internal network later) and the socket is in /var/lib/mysql not in /run/mysql. There was nothing in /run for mysql at all, after I went through the installations steps for LAMP.
Specifying server = localhost when you log in ought to suffice. In our "config.inc.php" I also see: $cfg['Servers'][$i]['host'] = 'localhost'; and we also have $cfg['AllowArbitraryServer']=true; $cfg['ArbitraryServerRegexp'] = '/^mysql.srv[0-9]+.example.com$/'; Hmm, I use datadir = /srv/mysql instead of the default /var/lib/mysql. Shouldn't really matter much.
The mysql configuration files show (comments removed)- quasar:/etc # cat my.cnf [client-server] !includedir /etc/my.cnf.d ------ and in /etc/my.cnf.d - # cat server.cnf [client-server] port=3306 [server] [mysqld] bind-address=0.0.0.0 port=3306 log-error=/var/log/mysql/errors.log general-log general-log-file=/var/log/mysql/queries.log [galera] bind-address=0.0.0.0 port=3306 [embedded] [mariadb] [mariadb-10.3] ----
How about posting your 'config.inc.php' from phpmyadmin? (the salient bits only) - I'll install phpmyadmin from our repos and see what it looks like.
OK I can do that, comments and security stuff removed....
$cfg['ZeroConf'] = false;
$cfg['blowfish_secret'] = 'random characters';
$i = 0; $i++; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = '/var/lib/mysql/mysql.sock'; $cfg['Servers'][$i]['ssl'] = false; $cfg['Servers'][$i]['connect_type'] = 'socket'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'rootpassword'; $cfg['Servers'][$i]['AllowNoPassword'] = false; $cfg['Servers'][$i]['AllowRoot'] = true; $cfg['Servers'][$i]['SignonSession'] = ''; $cfg['Servers'][$i]['SignonURL'] = ''; $cfg['Servers'][$i]['LogoutURL'] = ''; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['verbose_check'] = true; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); $cfg['Servers'][$i]['controlhost'] = 'localhost'; $cfg['Servers'][$i]['controlport'] = ''; $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark'; $cfg['Servers'][$i]['relation'] = 'pma__relation'; $cfg['Servers'][$i]['table_info'] = 'pma__table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma__column_info'; $cfg['Servers'][$i]['history'] = 'pma__history'; $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs'; $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; $cfg['Servers'][$i]['recent'] = 'pma__recent'; $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; $cfg['Servers'][$i]['users'] = 'pma__users'; $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
HTHs, and thank you.. Marc C... -- <b>Computers: the final frontier. These are the voyages of the user Marc.<br> His mission: to explore strange new hardware. To seek out new software and new applications.<br> To boldly go where no Marc has gone before!<br></b> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 8 May 2019 15:55:29 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
# mysql --version mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Linux (x86_64) using readline 5.1
Where did that come from? It's not the standard 15.0 version. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 5/8/19 5:32 PM, Dave Howorth wrote:
On Wed, 8 May 2019 15:55:29 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
# mysql --version mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Linux (x86_64) using readline 5.1 Where did that come from? It's not the standard 15.0 version.
Well thank you Dave! Good eyes too! Yep turns out another project (Apache James) required an "upgraded" version (10.3) of MariaDB, because versions 10.2 and earlier are broken when it comes to handling a particular query that Apache James wants to make. So to solve that, we added a repository directly from the MariaDB folks which got installed on all our systems, in order to get a "fixed" version. This happened about 6 months ago, and I didn't even think to check to see if there was a different repository being used. I had just assumed we were using the standard ones from the OpenSuSE repos. Typical, fixing one thing breaks another! Too damn many loose ends to keep track of, and we are kinda boxed in on this for now! So until we upgrade OpenSuSE and get a supported 10.3 or later release of MariaDB I will have to come up with a persistent version of the workaround I previously mentioned. So, just ignore those two engineers over in the corner who are gonna slap each other around for awhile... Marc.. -- <b>Computers: the final frontier. These are the voyages of the user Marc.<br> His mission: to explore strange new hardware. To seek out new software and new applications.<br> To boldly go where no Marc has gone before!<br></b> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 8 May 2019 21:06:49 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
On 5/8/19 5:32 PM, Dave Howorth wrote:
On Wed, 8 May 2019 15:55:29 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
# mysql --version mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Linux (x86_64) using readline 5.1 Where did that come from? It's not the standard 15.0 version.
Well thank you Dave! Good eyes too! Yep turns out another project (Apache James) required an "upgraded" version (10.3) of MariaDB, because versions 10.2 and earlier are broken when it comes to handling a particular query that Apache James wants to make. So to solve that, we added a repository directly from the MariaDB folks which got installed on all our systems, in order to get a "fixed" version. This happened about 6 months ago, and I didn't even think to check to see if there was a different repository being used. I had just assumed we were using the standard ones from the OpenSuSE repos.
So it's a bug report to the mariadb folks then. Run-time sockets are supposed to be under /run not /var/lib.
Typical, fixing one thing breaks another! Too damn many loose ends to keep track of, and we are kinda boxed in on this for now! So until we upgrade OpenSuSE and get a supported 10.3 or later release of MariaDB I will have to come up with a persistent version of the workaround I previously mentioned. So, just ignore those two engineers over in the corner who are gonna slap each other around for awhile...
Marc..
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Marc Chamberlin wrote:
I see mariadb listening on /run/mysql/mysql.sock, with /var/run being a symlink to /run. I believe that is the default.
# netstat -l | grep mysql tcp 0 0 0.0.0.0:mysql 0.0.0.0:* LISTEN unix 2 [ ACC ] STREAM LISTENING 4178857 /var/lib/mysql/mysql.sock
That is at least one discrepancy - as Dave noticed, you're on a different version of mariadb. That it inself should not make any difference, but it's not listening where the openSUSE packaged phpmyadmin expects to find it.
Nope, for me mysql seems to be listening on port 3306 on all interfaces (I will restrict it to just my internal network later) and the socket is in /var/lib/mysql not in /run/mysql. There was nothing in /run for mysql at all, after I went through the installations steps for LAMP.
Yep, makes sense now.
quasar:/etc # cat my.cnf
[snip] I expect this mariadb was built with a different set of defaults. In summary - you have a database listening on a socket that phpmyadmin doesn't know about. You can fix that in mariadb, in phpmyadmin or in php.ini. -- Per Jessen, Zürich (6.9°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 7 May 2019 23:06:48 -0700 Marc Chamberlin <marc@marcchamberlin.com> wrote:
In a nutshell, as currently packaged, phpMyAdmin will NOT come up and work on OpenSuSE Leap 15.0, out of the box, as described in so many LAMP articles posted around the internet, including the ones posted by/for OpenSuSE Leap 15.0. When MariaDB/MySQL is installed, it sets up a bunch of stuff, including an all important socket in the directory /var/lib/mysql.
Not on my Leap 15.0 it doesn't. There are no sockets in /var/lib/mysql $ ls -l /var/run/mysql total 0 srwxrwxrwx 1 mysql mysql 0 May 5 11:55 mysql.sock= $ mysql --version mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper I don't use phpmyadmin but I just installed it and it came up fine. I don't know why your system is apprently different, but that difference appears to be the source of your problem, not anything wrong with mariadb or phpmyadmin.
Thanks in advance for help and ideas... Marc... (sorry for the colorful remarks, it is LATE at night and I am tired!)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Adam Mizerski
-
Dave Howorth
-
Marc Chamberlin
-
Per Jessen