maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #05447
Re: Maxscale: Can't connect to information_schema database
-
To:
Jeff Dyke <jeff.dyke@xxxxxxxxx>
-
From:
Nicolas Bigler <nicolas.bigler@xxxxxxx>
-
Date:
Mon, 13 May 2019 10:37:31 +0200
-
Autocrypt:
addr=nicolas.bigler@xxxxxxx; prefer-encrypt=mutual; keydata= mQINBFRFMM4BEAC1Mo9qQ30F7dzCZrNr8WfXBVbi6/w1XAiieZ2MPzTjLd+1Pv1KnYQVnwLv ETZASFa0l4W4N5dATvF650Mc2eRHMyLKf2VRACYiOE8v7CDTGjCDNBkou5KgiHG4q0O368rn pcfJWpryqhZyQG8zCnu8Jv8m7RB3/6dGBb2DXxHs4cpvrO1vSFUkBeaOMuNJtrQQkjq/WcEz JnkON35vxJfPE+X3aki+3a9U8MN62byxuGCBYwxFeFWRTk9SmXVV6kkBvmxZJKuUZaT6HSuP El8IuBlRexe0I1rIaGuc9qrsVMq/Sl4c56FdiBY4C/wK3YImy5nvAhmTnoYAQPA+SOLIQIkU knxWrYL5joGxguQVgK+Ah9NoVAi6VosgsR/p5mJi4CkUAUxa5nJa+AOnyEwKa/dCLAwfuZgL HGIaQZHIDgTdGyQCo/mHC0IM8PDyPWSx5GZDzWpZrzsN2o658kE0odpYVBBmLtjEsCAqhh27 iwxT6bJevoZV0gkuy988JgjjQAaJ/eO+DRvgGF952lttljYzU+Lo0hByh9Y4BG/2LianHJD9 QydBOUmboc0VDPpm+dnGg5Vept+psTnwvKy/sQ2g2R6zxvFEdp1pPrPk8IkJPdOUEqW7MO2/ oV/ei4DYUwtpoDHJIZDkeiIIK4OGJU4/QtJGScj+YGQxuxGdDwARAQABtCdOaWNvbGFzIEJp Z2xlciA8bmljb2xhcy5iaWdsZXJAdnNobi5jaD6JAlgEEwECAEICGyMGCwkIBwMCBhUIAgkK CwQWAgMBAh4BAheAAhkBFiEECXKWHhV1iBWG8kr1CRA5lU37lN8FAlyvVQEFCQ4Nv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dnQbbGItdOq6ZlOINAM ikYpNc2s+g==
-
Cc:
maria-discuss@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<CAHmnZdb_wNx710ZZFZQpST5PPJb77GForOFDcUff-sDFeLYdww@mail.gmail.com>
-
Openpgp:
preference=signencrypt
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 <nicolas.bigler@xxxxxxx
> <mailto:nicolas.bigler@xxxxxxx>> 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 <my_db_server> 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 '<my_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:
>
> <?php
> # Fill our vars and run on cli
> # $ php -f db-connect-test.php
> $dbname = 'information_schema';
> $dbuser = '<my_db_user>';
> $dbpass = '<my_super_secret_pass';
> $dbhost = '127.0.0.1';
>
> # 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 '<my_db_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....',
> '<my_db_user>', '<my_super_secret_pass>...')
> #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@xxxxxxxxxxxxxxxxxxx
> <mailto:maria-discuss@xxxxxxxxxxxxxxxxxxx>
> 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
Follow ups
References