[Maria-discuss] Maxscale: Can't connect to information_schema database
Hey community
I'm currently struggling with maxscale when trying to connect to the
information_schema database.
I'm able to connect to this special database when connecting to the
database server directly:
mysql -h
Does that user from MaxScale have PROCESS permissions? That's normally the
only reason i've run into that error, but I'm not a MaxScale user, so
hopefully it's somewhat helpful.
On Thu, May 9, 2019 at 11:47 AM Nicolas Bigler
Hey community
I'm currently struggling with maxscale when trying to connect to the information_schema database.
I'm able to connect to this special database when connecting to the database server directly:
mysql -h
information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 101189 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [information_schema]>
However I can't connect to the database when going through maxscale:
mysql -h 127.0.0.1 information_schema ERROR 1045 (28000): Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' What does work is to connect to the database first (via maxscale) without specifying a database and then change to the information_schema database:
mysql -h 127.0.0.1 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 25321 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed
I don't quite understand why it doesn't work directly. I have a PHP application (magento2) that reads stuff from this database.
The following PHP script shows the same issue:
'; $dbpass = '
# pdo_testdb_connect.php - function for connecting to the "test" database
$dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass);
echo $dbh->exec ("SHOW TABLES FROM $dbname");
?>
$ php test.php PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' in /tmp/test.php:12 Stack trace: #0 /tmp/test.php(12): PDO->__construct('mysql:host=127....', ' ', ' ...') #1 {main} thrown in /tmp/test.php on line 12 Is there a way to solve this issue?
Any help would be appreciated.
Thanks
Nicolas
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Yes the user has that permission. So this does not seem to be the issue in this case. On 09.05.19 18:36, Jeff Dyke wrote:
Does that user from MaxScale have PROCESS permissions? That's normally the only reason i've run into that error, but I'm not a MaxScale user, so hopefully it's somewhat helpful.
On Thu, May 9, 2019 at 11:47 AM Nicolas Bigler
mailto:nicolas.bigler@vshn.ch> wrote: Hey community
I'm currently struggling with maxscale when trying to connect to the information_schema database.
I'm able to connect to this special database when connecting to the database server directly:
mysql -h
information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 101189 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org http://mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [information_schema]>
However I can't connect to the database when going through maxscale:
mysql -h 127.0.0.1 information_schema ERROR 1045 (28000): Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' What does work is to connect to the database first (via maxscale) without specifying a database and then change to the information_schema database:
mysql -h 127.0.0.1 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 25321 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org http://mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed
I don't quite understand why it doesn't work directly. I have a PHP application (magento2) that reads stuff from this database.
The following PHP script shows the same issue:
'; $dbpass = '
# pdo_testdb_connect.php - function for connecting to the "test" database
$dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass);
echo $dbh->exec ("SHOW TABLES FROM $dbname");
?>
$ php test.php PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' in /tmp/test.php:12 Stack trace: #0 /tmp/test.php(12): PDO->__construct('mysql:host=127....', ' ', ' ...') #1 {main} thrown in /tmp/test.php on line 12 Is there a way to solve this issue?
Any help would be appreciated.
Thanks
Nicolas
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net mailto:maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Nicolas Bigler System Engineer VSHN AG | Neugasse 10 | CH-8005 Zürich T: +41 44 545 53 00 | http://vshn.ch
Hi, Could you open a bug report about this on the MariaDB Jira under the MaxScale project https://jira.mariadb.org/browse/MXS? Markus On 5/13/19 11:37, Nicolas Bigler wrote:
Yes the user has that permission. So this does not seem to be the issue in this case.
On 09.05.19 18:36, Jeff Dyke wrote:
Does that user from MaxScale have PROCESS permissions? That's normally the only reason i've run into that error, but I'm not a MaxScale user, so hopefully it's somewhat helpful.
On Thu, May 9, 2019 at 11:47 AM Nicolas Bigler
mailto:nicolas.bigler@vshn.ch> wrote: Hey community
I'm currently struggling with maxscale when trying to connect to the information_schema database.
I'm able to connect to this special database when connecting to the database server directly:
mysql -h
information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 101189 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org http://mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [information_schema]>
However I can't connect to the database when going through maxscale:
mysql -h 127.0.0.1 information_schema ERROR 1045 (28000): Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' What does work is to connect to the database first (via maxscale) without specifying a database and then change to the information_schema database:
mysql -h 127.0.0.1 Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 25321 Server version: 10.2.23-MariaDB-1:10.2.23+maria~bionic-log mariadb.org http://mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use information_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed
I don't quite understand why it doesn't work directly. I have a PHP application (magento2) that reads stuff from this database.
The following PHP script shows the same issue:
'; $dbpass = '
# pdo_testdb_connect.php - function for connecting to the "test" database
$dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass);
echo $dbh->exec ("SHOW TABLES FROM $dbname");
?>
$ php test.php PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user '
'@'127.0.0.1' (using password: YES) to database 'information_schema' in /tmp/test.php:12 Stack trace: #0 /tmp/test.php(12): PDO->__construct('mysql:host=127....', ' ', ' ...') #1 {main} thrown in /tmp/test.php on line 12 Is there a way to solve this issue?
Any help would be appreciated.
Thanks
Nicolas
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net mailto:maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Markus Mäkelä, Senior Software Engineer MariaDB Corporation t: +358 40 7740484 | IRC: markusjm@freenode
participants (3)
-
Jeff Dyke
-
Markus Mäkelä
-
Nicolas Bigler