Menu

#4127 information_schema - $cfg['Servers']

4.0.5
duplicate
nobody
5
2013-11-22
2013-10-11
clubbu
No

Hello,
I use phpMyAdmin 4.0.5

In according to phpmyadmin documentation there is following directive that does NOT work:

config:option:: $cfg['Servers'][$i]['ShowDatabasesCommand']

:type: string
:default: 'SHOW DATABASES'

On a server with a huge number of databases, the default SHOW DATABASES
command used to fetch the name of available databases will probably be too
slow, so it can be replaced by faster commands. You can use #user#
string will be replaced by current user.

When using false, it will disable fetching databases from the server,
only databases in :config:option:$cfg['Servers'][$i]['only_db'] will be
displayed.

Examples:

  • 'SHOW DATABASES'
  • "SHOW DATABASES LIKE '#user#\_%'"
  • 'SELECT DISTINCT TABLE_SCHEMA FROM information_schema.SCHEMA_PRIVILEGES'
  • 'SELECT SCHEMA_NAME FROM information_schema.SCHEMATA'
  • false

If i set this directive with "SHOW DATABASES LIKE '#user#\_%'" or false in /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php it just be ignored as you can see on mysql_log:

Time: 131009 22:51:35

User@Host: [*] @ s [10.0.1.12]

Query_time: 8.129845 Lock_time: 0.000094 Rows_sent: 2 Rows_examined: 5

SET timestamp=1381351895;
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE AND SCHEMA_NAME NOT REGEXP 'information_schema' ORDER BY SCHEMA_NAME ASC LIMIT 0, 25;

Time: 131009 22:51:43

User@Host: *[*] @ * [10.0.1.12]

Query_time: 7.905233 Lock_time: 0.000115 Rows_sent: 3 Rows_examined: 3

SET timestamp=1381351903;
SHOW DATABASES;

Time: 131009 22:51:51

User@Host: *[*] @ * [10.0.1.12]

Query_time: 7.927969 Lock_time: 0.000143 Rows_sent: 3 Rows_examined: 3

SET timestamp=1381351911;
SHOW DATABASES;

Have a solution?

Discussion

  • Marc Delisle

    Marc Delisle - 2013-10-11

    No solution yet. Duplicate ticket, see
    https://sourceforge.net/p/phpmyadmin/bugs/3945/

     
  • Marc Delisle

    Marc Delisle - 2013-10-11
    • status: open --> duplicate
     
  • clubbu

    clubbu - 2013-10-11

    Is a bug or my personal problem?

     
  • Marc Delisle

    Marc Delisle - 2013-10-11

    A bug.

     
  • Marc Delisle

    Marc Delisle - 2013-10-24

    Hi,
    I need more details. When you say "a huge number of databases", you mean how many (approximately)?
    Also, on which MySQL version did you experience slow response, running phpMyAdmin 4.0.5 ?

     
  • Marc Delisle

    Marc Delisle - 2013-11-01

    We are deprecating the ShowDatabasesCommand directive for phpMyAdmin 4.1; this version will require a minimum of MySQL 5.5.

     
  • Sanryu

    Sanryu - 2013-11-21

    hi,
    i have a same problem, then wich solution is recommend ?

     
  • Marc Delisle

    Marc Delisle - 2013-11-22

    Sanryu,
    it depends: which MySQL version are you using?

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.