Translated using Weblate (Slovenian)
[phpmyadmin.git] / doc / config.rst
blob5e8592d61b38e463cb044951eb126730994ac8d1
1 .. index:: config.inc.php
3 .. _config:
5 Configuration
6 =============
8 All configurable data is placed in :file:`config.inc.php` in phpMyAdmin's
9 toplevel directory.  If this file does not exist, please refer to the
10 :ref:`setup` section to create one. This file only needs to contain the
11 parameters you want to change from their corresponding default value in
12 :file:`libraries/config.default.php` (this file is not intended for changes).
14 .. seealso::
16     :ref:`config-examples` for examples of configurations
18 If a directive is missing from your file, you can just add another line with
19 the file. This file is for over-writing the defaults; if you wish to use the
20 default value there's no need to add a line here.
22 The parameters which relate to design (like colors) are placed in
23 :file:`themes/themename/layout.inc.php`. You might also want to create
24 :file:`config.footer.inc.php` and :file:`config.header.inc.php` files to add
25 your site specific code to be included on start and end of each page.
27 .. note::
29     Some distributions (eg. Debian or Ubuntu) store :file:`config.inc.php` in
30     ``/etc/phpmyadmin`` instead of within phpMyAdmin sources.
32 .. warning::
34     :term:`Mac` users should note that if you are on a version before
35     :term:`Mac OS X`, PHP does not seem to
36     like :term:`Mac` end of lines character (``\r``). So
37     ensure you choose the option that allows to use the \*nix end of line
38     character (``\n``) in your text editor before saving a script you have
39     modified.
41 Basic settings
42 --------------
44 .. config:option:: $cfg['PmaAbsoluteUri']
46     :type: string
47     :default: ``''``
49     .. versionchanged:: 4.6.5
51         This setting was not available in phpMyAdmin 4.6.0 - 4.6.4.
53     Sets here the complete :term:`URL` (with full path) to your phpMyAdmin
54     installation's directory. E.g.
55     ``https://www.example.net/path_to_your_phpMyAdmin_directory/``. Note also
56     that the :term:`URL` on most of web servers are case sensitive (even on
57     Windows). Don’t forget the trailing slash at the end.
59     Starting with version 2.3.0, it is advisable to try leaving this blank. In
60     most cases phpMyAdmin automatically detects the proper setting. Users of
61     port forwarding or complex reverse proxy setup might need to set this.
63     A good test is to browse a table, edit a row and save it. There should be
64     an error message if phpMyAdmin is having trouble auto–detecting the correct
65     value. If you get an error that this must be set or if the autodetect code
66     fails to detect your path, please post a bug report on our bug tracker so
67     we can improve the code.
69     .. seealso:: :ref:`faq1_40`, :ref:`faq2_5`, :ref:`faq4_7`, :ref:`faq5_16`
71 .. config:option:: $cfg['PmaNoRelation_DisableWarning']
73     :type: boolean
74     :default: false
76     Starting with version 2.3.0 phpMyAdmin offers a lot of features to
77     work with master / foreign – tables (see :config:option:`$cfg['Servers'][$i]['pmadb']`).
79     If you tried to set this
80     up and it does not work for you, have a look on the :guilabel:`Structure` page
81     of one database where you would like to use it. You will find a link
82     that will analyze why those features have been disabled.
84     If you do not want to use those features set this variable to ``true`` to
85     stop this message from appearing.
87 .. config:option:: $cfg['AuthLog']
89     :type: string
90     :default: ``'auto'``
92     .. versionadded:: 4.8.0
94         This is supported since phpMyAdmin 4.8.0.
96     Configure authentication logging destination. Failed (or all, depending on
97     :config:option:`$cfg['AuthLogSuccess']`) authentication attempts will be
98     logged according to this directive:
100     ``auto``
101         Let phpMyAdmin automatically choose between ``syslog`` and ``php``.
102     ``syslog``
103         Log using syslog, using AUTH facility, on most systems this ends up
104         in :file:`/var/log/auth.log`.
105     ``php``
106         Log into PHP error log.
107     ``sapi``
108         Log into PHP SAPI logging.
109     ``/path/to/file``
110         Any other value is treated as a filename and log entries are written there.
112     .. note::
114         When logging to a file, make sure its permissions are correctly set
115         for a web server user, the setup should closely match instructions
116         described in :config:option:`$cfg['TempDir']`:
118 .. config:option:: $cfg['AuthLogSuccess']
120     :type: boolean
121     :default: false
123     .. versionadded:: 4.8.0
125         This is supported since phpMyAdmin 4.8.0.
127     Whether to log successful authentication attempts into
128     :config:option:`$cfg['AuthLog']`.
130 .. config:option:: $cfg['SuhosinDisableWarning']
132     :type: boolean
133     :default: false
135     A warning is displayed on the main page if Suhosin is detected.
137     You can set this parameter to ``true`` to stop this message from appearing.
139 .. config:option:: $cfg['LoginCookieValidityDisableWarning']
141     :type: boolean
142     :default: false
144     A warning is displayed on the main page if the PHP parameter
145     session.gc_maxlifetime is lower than cookie validity configured in phpMyAdmin.
147     You can set this parameter to ``true`` to stop this message from appearing.
149 .. config:option:: $cfg['ServerLibraryDifference_DisableWarning']
151     :type: boolean
152     :default: false
154     .. deprecated:: 4.7.0
156         This setting was removed as the warning has been removed as well.
158     A warning is displayed on the main page if there is a difference
159     between the MySQL library and server version.
161     You can set this parameter to ``true`` to stop this message from appearing.
163 .. config:option:: $cfg['ReservedWordDisableWarning']
165     :type: boolean
166     :default: false
168     This warning is displayed on the Structure page of a table if one or more
169     column names match with words which are MySQL reserved.
171     If you want to turn off this warning, you can set it to ``true`` and
172     warning will no longer be displayed.
174 .. config:option:: $cfg['TranslationWarningThreshold']
176     :type: integer
177     :default: 80
179     Show warning about incomplete translations on certain threshold.
181 .. config:option:: $cfg['SendErrorReports']
183     :type: string
184     :default: ``'ask'``
186     Sets the default behavior for JavaScript error reporting.
188     Whenever an error is detected in the JavaScript execution, an error report
189     may be sent to the phpMyAdmin team if the user agrees.
191     The default setting of ``'ask'`` will ask the user everytime there is a new
192     error report. However you can set this parameter to ``'always'`` to send error
193     reports without asking for confirmation or you can set it to ``'never'`` to
194     never send error reports.
196     This directive is available both in the configuration file and in users
197     preferences. If the person in charge of a multi-user installation prefers
198     to disable this feature for all users, a value of ``'never'`` should be
199     set, and the :config:option:`$cfg['UserprefsDisallow']` directive should
200     contain ``'SendErrorReports'`` in one of its array values.
202 .. config:option:: $cfg['ConsoleEnterExecutes']
204     :type: boolean
205     :default: false
207     Setting this to ``true`` allows the user to execute queries by pressing Enter
208     instead of Ctrl+Enter. A new line can be inserted by pressing Shift + Enter.
210     The behaviour of the console can be temporarily changed using console's
211     settings interface.
213 .. config:option:: $cfg['AllowThirdPartyFraming']
215     :type: boolean|string
216     :default: false
218     Setting this to ``true`` allows phpMyAdmin to be included inside a frame,
219     and is a potential security hole allowing cross-frame scripting attacks or
220     clickjacking. Setting this to 'sameorigin' prevents phpMyAdmin to be 
221     included from another document in a frame, unless that document belongs 
222     to the same domain.
224 Server connection settings
225 --------------------------
227 .. config:option:: $cfg['Servers']
229     :type: array
230     :default: one server array with settings listed below
232     Since version 1.4.2, phpMyAdmin supports the administration of multiple
233     MySQL servers. Therefore, a :config:option:`$cfg['Servers']`-array has been
234     added which contains the login information for the different servers. The
235     first :config:option:`$cfg['Servers'][$i]['host']` contains the hostname of
236     the first server, the second :config:option:`$cfg['Servers'][$i]['host']`
237     the hostname of the second server, etc. In
238     :file:`libraries/config.default.php`, there is only one section for server
239     definition, however you can put as many as you need in
240     :file:`config.inc.php`, copy that block or needed parts (you don't have to
241     define all settings, just those you need to change).
243     .. note::
245         The :config:option:`$cfg['Servers']` array starts with
246         $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. If you want more
247         than one server, just copy following section (including $i
248         incrementation) serveral times. There is no need to define full server
249         array, just define values you need to change.
251 .. config:option:: $cfg['Servers'][$i]['host']
253     :type: string
254     :default: ``'localhost'``
256     The hostname or :term:`IP` address of your $i-th MySQL-server. E.g.
257     ``localhost``.
259     Possible values are:
261     * hostname, e.g., ``'localhost'`` or ``'mydb.example.org'``
262     * IP address, e.g., ``'127.0.0.1'`` or ``'192.168.10.1'``
263     * IPv6 address, e.g. ``2001:cdba:0000:0000:0000:0000:3257:9652``
264     * dot - ``'.'``, i.e., use named pipes on windows systems
265     * empty - ``''``, disables this server
267     .. note::
269         The hostname ``localhost`` is handled specially by MySQL and it uses
270         the socket based connection protocol. To use TCP/IP networking, use an
271         IP address or hostname such as ``127.0.0.1`` or ``db.example.com``. You
272         can configure the path to the socket with
273         :config:option:`$cfg['Servers'][$i]['socket']`.
275     .. seealso::
277         :config:option:`$cfg['Servers'][$i]['port']`,
278         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
280 .. config:option:: $cfg['Servers'][$i]['port']
282     :type: string
283     :default: ``''``
285     The port-number of your $i-th MySQL-server. Default is 3306 (leave
286     blank).
288     .. note::
290        If you use ``localhost`` as the hostname, MySQL ignores this port number
291        and connects with the socket, so if you want to connect to a port
292        different from the default port, use ``127.0.0.1`` or the real hostname
293        in :config:option:`$cfg['Servers'][$i]['host']`.
295     .. seealso::
297         :config:option:`$cfg['Servers'][$i]['host']`,
298         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
300 .. config:option:: $cfg['Servers'][$i]['socket']
302     :type: string
303     :default: ``''``
305     The path to the socket to use. Leave blank for default. To determine
306     the correct socket, check your MySQL configuration or, using the
307     :command:`mysql` command–line client, issue the ``status`` command. Among the
308     resulting information displayed will be the socket used.
310     .. note::
312         This takes effect only if :config:option:`$cfg['Servers'][$i]['host']` is set
313         to ``localhost``.
315     .. seealso::
317         :config:option:`$cfg['Servers'][$i]['host']`,
318         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
320 .. config:option:: $cfg['Servers'][$i]['ssl']
322     :type: boolean
323     :default: false
325     Whether to enable SSL for the connection between phpMyAdmin and the MySQL
326     server to secure the connection.
328     When using the ``'mysql'`` extension,
329     none of the remaining ``'ssl...'`` configuration options apply.
331     We strongly recommend the ``'mysqli'`` extension when using this option.
333     .. seealso::
335         :ref:`ssl`,
336         :ref:`example-google-ssl`,
337         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
338         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
339         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
340         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
341         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
342         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
344 .. config:option:: $cfg['Servers'][$i]['ssl_key']
346     :type: string
347     :default: NULL
349     Path to the client key file when using SSL for connecting to the MySQL
350     server. This is used to authenticate the client to the server.
352     For example:
354     .. code-block:: php
356         $cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/server-key.pem';
358     .. seealso::
360         :ref:`ssl`,
361         :ref:`example-google-ssl`,
362         :config:option:`$cfg['Servers'][$i]['ssl']`,
363         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
364         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
365         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
366         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
367         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
369 .. config:option:: $cfg['Servers'][$i]['ssl_cert']
371     :type: string
372     :default: NULL
374     Path to the client certificate file when using SSL for connecting to the
375     MySQL server. This is used to authenticate the client to the server.
377     .. seealso::
379         :ref:`ssl`,
380         :ref:`example-google-ssl`,
381         :config:option:`$cfg['Servers'][$i]['ssl']`,
382         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
383         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
384         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
385         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
386         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
388 .. config:option:: $cfg['Servers'][$i]['ssl_ca']
390     :type: string
391     :default: NULL
393     Path to the CA file when using SSL for connecting to the MySQL server.
395     .. seealso::
397         :ref:`ssl`,
398         :ref:`example-google-ssl`,
399         :config:option:`$cfg['Servers'][$i]['ssl']`,
400         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
401         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
402         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
403         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
404         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
406 .. config:option:: $cfg['Servers'][$i]['ssl_ca_path']
408     :type: string
409     :default: NULL
411     Directory containing trusted SSL CA certificates in PEM format.
413     .. seealso::
415         :ref:`ssl`,
416         :ref:`example-google-ssl`,
417         :config:option:`$cfg['Servers'][$i]['ssl']`,
418         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
419         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
420         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
421         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
422         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
424 .. config:option:: $cfg['Servers'][$i]['ssl_ciphers']
426     :type: string
427     :default: NULL
429     List of allowable ciphers for SSL connections to the MySQL server.
431     .. seealso::
433         :ref:`ssl`,
434         :ref:`example-google-ssl`,
435         :config:option:`$cfg['Servers'][$i]['ssl']`,
436         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
437         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
438         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
439         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
440         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
442 .. config:option:: $cfg['Servers'][$i]['ssl_verify']
444     :type: boolean
445     :default: true
447     .. versionadded:: 4.6.0
449         This is supported since phpMyAdmin 4.6.0.
451     If your PHP install uses the MySQL Native Driver (mysqlnd), your
452     MySQL server is 5.6 or later, and your SSL certificate is self-signed,
453     there is a chance your SSL connection will fail due to validation.
454     Setting this to ``false`` will disable the validation check.
456     Since PHP 5.6.0 it also verifies whether server name matches CN of its
457     certificate. There is currently no way to disable just this check without
458     disabling complete SSL verification.
460     .. warning::
462         Disabling the certificate verification defeats purpose of using SSL.
463         This will make the connection vulnerable to man in the middle attacks.
465     .. note::
467         This flag only works with PHP 5.6.16 or later.
469     .. seealso::
471         :ref:`ssl`,
472         :ref:`example-google-ssl`,
473         :config:option:`$cfg['Servers'][$i]['ssl']`,
474         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
475         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
476         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
477         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
478         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
479         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
481 .. config:option:: $cfg['Servers'][$i]['connect_type']
483     :type: string
484     :default: ``'tcp'``
486     .. deprecated:: 4.7.0
488        This setting is no longer used as of 4.7.0, since MySQL decides the
489        connection type based on host, so it could lead to unexpected results.
490        Please set :config:option:`$cfg['Servers'][$i]['host']` accordingly
491        instead.
493     What type connection to use with the MySQL server. Your options are
494     ``'socket'`` and ``'tcp'``. It defaults to tcp as that is nearly guaranteed
495     to be available on all MySQL servers, while sockets are not supported on
496     some platforms. To use the socket mode, your MySQL server must be on the
497     same machine as the Web server.
499 .. config:option:: $cfg['Servers'][$i]['compress']
501     :type: boolean
502     :default: false
504     Whether to use a compressed protocol for the MySQL server connection
505     or not (experimental).
507 .. _controlhost:
508 .. config:option:: $cfg['Servers'][$i]['controlhost']
510     :type: string
511     :default: ``''``
513     Permits to use an alternate host to hold the configuration storage
514     data.
516     .. seealso::
518         :config:option:`$cfg['Servers'][$i]['control_*']`
520 .. _controlport:
521 .. config:option:: $cfg['Servers'][$i]['controlport']
523     :type: string
524     :default: ``''``
526     Permits to use an alternate port to connect to the host that
527     holds the configuration storage.
529     .. seealso::
531         :config:option:`$cfg['Servers'][$i]['control_*']`
533 .. _controluser:
534 .. config:option:: $cfg['Servers'][$i]['controluser']
536     :type: string
537     :default: ``''``
539 .. config:option:: $cfg['Servers'][$i]['controlpass']
541     :type: string
542     :default: ``''``
544     This special account is used to access :ref:`linked-tables`.
545     You don't need it in single user case, but if phpMyAdmin is shared it
546     is recommended to give access to :ref:`linked-tables` only to this user
547     and configure phpMyAdmin to use it. All users will then be able to use
548     the features without need to have direct access to :ref:`linked-tables`.
550     .. versionchanged:: 2.2.5
551         those were called ``stduser`` and ``stdpass``
553     .. seealso::
555         :ref:`setup`,
556         :ref:`authentication_modes`,
557         :ref:`linked-tables`,
558         :config:option:`$cfg['Servers'][$i]['pmadb']`,
559         :config:option:`$cfg['Servers'][$i]['controlhost']`,
560         :config:option:`$cfg['Servers'][$i]['controlport']`,
561         :config:option:`$cfg['Servers'][$i]['control_*']`
563 .. config:option:: $cfg['Servers'][$i]['control_*']
565     :type: mixed
567     .. versionadded:: 4.7.0
569     You can change any MySQL connection setting for control link (used to
570     access :ref:`linked-tables`) using configuration prefixed with ``control_``.
572     This can be used to change any aspect of the control connection, which by
573     default uses same parameters as the user one.
575     For example you can configure SSL for the control connection:
577     .. code-block:: php
579         // Enable SSL
580         $cfg['Servers'][$i]['control_ssl'] = true;
581         // Client secret key
582         $cfg['Servers'][$i]['control_ssl_key'] = '../client-key.pem';
583         // Client certificate
584         $cfg['Servers'][$i]['control_ssl_cert'] = '../client-cert.pem';
585         // Server certification authority
586         $cfg['Servers'][$i]['control_ssl_ca'] = '../server-ca.pem';
588     .. seealso::
590         :config:option:`$cfg['Servers'][$i]['ssl']`,
591         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
592         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
593         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
594         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
595         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
596         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
598 .. config:option:: $cfg['Servers'][$i]['auth_type']
600     :type: string
601     :default: ``'cookie'``
603     Whether config or cookie or :term:`HTTP` or signon authentication should be
604     used for this server.
606     * 'config' authentication (``$auth_type = 'config'``) is the plain old
607       way: username and password are stored in :file:`config.inc.php`.
608     * 'cookie' authentication mode (``$auth_type = 'cookie'``) allows you to
609       log in as any valid MySQL user with the help of cookies.
610     * 'http' authentication allows you to log in as any
611       valid MySQL user via HTTP-Auth.
612     * 'signon' authentication mode (``$auth_type = 'signon'``) allows you to
613       log in from prepared PHP session data or using supplied PHP script.
615     .. seealso:: :ref:`authentication_modes`
617 .. _servers_auth_http_realm:
618 .. config:option:: $cfg['Servers'][$i]['auth_http_realm']
620     :type: string
621     :default: ``''``
623     When using auth\_type = ``http``, this field allows to define a custom
624     :term:`HTTP` Basic Auth Realm which will be displayed to the user. If not
625     explicitly specified in your configuration, a string combined of
626     "phpMyAdmin " and either :config:option:`$cfg['Servers'][$i]['verbose']` or
627     :config:option:`$cfg['Servers'][$i]['host']` will be used.
629 .. _servers_user:
630 .. config:option:: $cfg['Servers'][$i]['user']
632     :type: string
633     :default: ``'root'``
635 .. config:option:: $cfg['Servers'][$i]['password']
637     :type: string
638     :default: ``''``
640     When using :config:option:`$cfg['Servers'][$i]['auth_type']` set to
641     'config', this is the user/password-pair which phpMyAdmin will use to
642     connect to the MySQL server. This user/password pair is not needed when
643     :term:`HTTP` or cookie authentication is used
644     and should be empty.
646 .. _servers_nopassword:
647 .. config:option:: $cfg['Servers'][$i]['nopassword']
649     :type: boolean
650     :default: false
652     .. deprecated:: 4.7.0
654         This setting was removed as it can produce unexpected results.
656     Allow attempt to log in without password when a login with password
657     fails. This can be used together with http authentication, when
658     authentication is done some other way and phpMyAdmin gets user name
659     from auth and uses empty password for connecting to MySQL. Password
660     login is still tried first, but as fallback, no password method is
661     tried.
663 .. _servers_only_db:
664 .. config:option:: $cfg['Servers'][$i]['only_db']
666     :type: string or array
667     :default: ``''``
669     If set to a (an array of) database name(s), only this (these)
670     database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
671     this/these database(s) name(s) may contain MySQL wildcards characters
672     ("\_" and "%"): if you want to use literal instances of these
673     characters, escape them (I.E. use ``'my\_db'`` and not ``'my_db'``).
675     This setting is an efficient way to lower the server load since the
676     latter does not need to send MySQL requests to build the available
677     database list. But **it does not replace the privileges rules of the
678     MySQL database server**. If set, it just means only these databases
679     will be displayed but **not that all other databases can't be used.**
681     An example of using more that one database:
683     .. code-block:: php
685         $cfg['Servers'][$i]['only_db'] = array('db1', 'db2');
687     .. versionchanged:: 4.0.0
688         Previous versions permitted to specify the display order of
689         the database names via this directive.
691 .. config:option:: $cfg['Servers'][$i]['hide_db']
693     :type: string
694     :default: ``''``
696     Regular expression for hiding some databases from unprivileged users.
697     This only hides them from listing, but a user is still able to access
698     them (using, for example, the SQL query area). To limit access, use
699     the MySQL privilege system.  For example, to hide all databases
700     starting with the letter "a", use
702     .. code-block:: php
704         $cfg['Servers'][$i]['hide_db'] = '^a';
706     and to hide both "db1" and "db2" use
708     .. code-block:: php
710         $cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';
712     More information on regular expressions can be found in the `PCRE
713     pattern syntax
714     <https://www.php.net/manual/en/reference.pcre.pattern.syntax.php>`_ portion
715     of the PHP reference manual.
717 .. config:option:: $cfg['Servers'][$i]['verbose']
719     :type: string
720     :default: ``''``
722     Only useful when using phpMyAdmin with multiple server entries. If
723     set, this string will be displayed instead of the hostname in the
724     pull-down menu on the main page. This can be useful if you want to
725     show only certain databases on your system, for example. For HTTP
726     auth, all non-US-ASCII characters will be stripped.
728 .. config:option:: $cfg['Servers'][$i]['extension']
730     :type: string
731     :default: ``'mysqli'``
733     .. deprecated:: 4.2.0
735         This setting was removed. The ``mysql`` extension will only be used when
736         the ``mysqli`` extension is not available. As of 5.0.0, only the
737         ``mysqli`` extension can be used.
739     The PHP MySQL extension to use (``mysql`` or ``mysqli``).
741     It is recommended to use ``mysqli`` in all installations.
743 .. config:option:: $cfg['Servers'][$i]['pmadb']
745     :type: string
746     :default: ``''``
748     The name of the database containing the phpMyAdmin configuration
749     storage.
751     See the :ref:`linked-tables`  section in this document to see the benefits of
752     this feature, and for a quick way of creating this database and the needed
753     tables.
755     If you are the only user of this phpMyAdmin installation, you can use your
756     current database to store those special tables; in this case, just put your
757     current database name in :config:option:`$cfg['Servers'][$i]['pmadb']`. For a
758     multi-user installation, set this parameter to the name of your central
759     database containing the phpMyAdmin configuration storage.
761 .. _bookmark:
762 .. config:option:: $cfg['Servers'][$i]['bookmarktable']
764     :type: string or false
765     :default: ``''``
767     Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
768     can be useful for queries you often run. To allow the usage of this
769     functionality:
771     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
772     * enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
774     This feature can be disabled by setting the configuration to ``false``.
776 .. _relation:
777 .. config:option:: $cfg['Servers'][$i]['relation']
779     :type: string or false
780     :default: ``''``
782     Since release 2.2.4 you can describe, in a special 'relation' table,
783     which column is a key in another table (a foreign key). phpMyAdmin
784     currently uses this to:
786     * make clickable, when you browse the master table, the data values that
787       point to the foreign table;
788     * display in an optional tool-tip the "display column" when browsing the
789       master table, if you move the mouse to a column containing a foreign
790       key (use also the 'table\_info' table); (see :ref:`faqdisplay`)
791     * in edit/insert mode, display a drop-down list of possible foreign keys
792       (key value and "display column" are shown) (see :ref:`faq6_21`)
793     * display links on the table properties page, to check referential
794       integrity (display missing foreign keys) for each described key;
795     * in query-by-example, create automatic joins (see :ref:`faq6_6`)
796     * enable you to get a :term:`PDF` schema of
797       your database (also uses the table\_coords table).
799     The keys can be numeric or character.
801     To allow the usage of this functionality:
803     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
804     * put the relation table name in :config:option:`$cfg['Servers'][$i]['relation']`
805     * now as normal user open phpMyAdmin and for each one of your tables
806       where you want to use this feature, click :guilabel:`Structure/Relation view/`
807       and choose foreign columns.
809     This feature can be disabled by setting the configuration to ``false``.
811     .. note::
813         In the current version, ``master_db`` must be the same as ``foreign_db``.
814         Those columns have been put in future development of the cross-db
815         relations.
817 .. _table_info:
818 .. config:option:: $cfg['Servers'][$i]['table_info']
820     :type: string or false
821     :default: ``''``
823     Since release 2.3.0 you can describe, in a special 'table\_info'
824     table, which column is to be displayed as a tool-tip when moving the
825     cursor over the corresponding key. This configuration variable will
826     hold the name of this special table. To allow the usage of this
827     functionality:
829     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
830     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_info']` (e.g.
831       ``pma__table_info``)
832     * then for each table where you want to use this feature, click
833       "Structure/Relation view/Choose column to display" to choose the
834       column.
836     This feature can be disabled by setting the configuration to ``false``.
838     .. seealso:: :ref:`faqdisplay`
840 .. _table_coords:
841 .. config:option:: $cfg['Servers'][$i]['table_coords']
843     :type: string or false
844     :default: ``''``
846     The designer feature can save your page layout; by pressing the "Save page" or "Save page as"
847     button in the expanding designer menu, you can customize the layout and have it loaded the next
848     time you use the designer. That layout is stored in this table. Furthermore, this table is also
849     required for using the PDF relation export feature, see
850     :config:option:`$cfg['Servers'][$i]['pdf\_pages']` for additional details.
852 .. config:option:: $cfg['Servers'][$i]['pdf_pages']
854     :type: string or false
855     :default: ``''``
857     Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
858     showing the relations between your tables. Further, the designer interface
859     permits visually managing the relations. To do this it needs two tables
860     "pdf\_pages" (storing information about the available :term:`PDF` pages)
861     and "table\_coords" (storing coordinates where each table will be placed on
862     a :term:`PDF` schema output).  You must be using the "relation" feature.
864     To allow the usage of this functionality:
866     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
867     * put the correct table names in
868       :config:option:`$cfg['Servers'][$i]['table\_coords']` and
869       :config:option:`$cfg['Servers'][$i]['pdf\_pages']`
871     This feature can be disabled by setting either of the configurations to ``false``.
873     .. seealso:: :ref:`faqpdf`.
875 .. _col_com:
876 .. config:option:: $cfg['Servers'][$i]['column_info']
878     :type: string or false
879     :default: ``''``
881     This part requires a content update!  Since release 2.3.0 you can
882     store comments to describe each column for each table. These will then
883     be shown on the "printview".
885     Starting with release 2.5.0, comments are consequently used on the table
886     property pages and table browse view, showing up as tool-tips above the
887     column name (properties page) or embedded within the header of table in
888     browse view. They can also be shown in a table dump. Please see the
889     relevant configuration directives later on.
891     Also new in release 2.5.0 is a MIME- transformation system which is also
892     based on the following table structure. See :ref:`transformations` for
893     further information. To use the MIME- transformation system, your
894     column\_info table has to have the three new columns 'mimetype',
895     'transformation', 'transformation\_options'.
897     Starting with release 4.3.0, a new input-oriented transformation system
898     has been introduced. Also, backward compatibility code used in the old
899     transformations system was removed. As a result, an update to column\_info
900     table is necessary for previous transformations and the new input-oriented
901     transformation system to work. phpMyAdmin will upgrade it automatically
902     for you by analyzing your current column\_info table structure.
903     However, if something goes wrong with the auto-upgrade then you can
904     use the SQL script found in ``./sql/upgrade_column_info_4_3_0+.sql``
905     to upgrade it manually.
907     To allow the usage of this functionality:
909     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
910     * put the table name in :config:option:`$cfg['Servers'][$i]['column\_info']` (e.g.
911       ``pma__column_info``)
912     * to update your PRE-2.5.0 Column\_comments table use this:  and
913       remember that the Variable in :file:`config.inc.php` has been renamed from
914       :samp:`$cfg['Servers'][$i]['column\_comments']` to
915       :config:option:`$cfg['Servers'][$i]['column\_info']`
917       .. code-block:: mysql
919            ALTER TABLE `pma__column_comments`
920            ADD `mimetype` VARCHAR( 255 ) NOT NULL,
921            ADD `transformation` VARCHAR( 255 ) NOT NULL,
922            ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
923     * to update your PRE-4.3.0 Column\_info table manually use this
924       ``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
926     This feature can be disabled by setting the configuration to ``false``.
928     .. note::
930         For auto-upgrade functionality to work, your
931         :config:option:`$cfg['Servers'][$i]['controluser']` must have ALTER privilege on
932         ``phpmyadmin`` database. See the `MySQL documentation for GRANT
933         <https://dev.mysql.com/doc/refman/5.7/en/grant.html>`_ on how to
934         ``GRANT`` privileges to a user.
936 .. _history:
937 .. config:option:: $cfg['Servers'][$i]['history']
939     :type: string or false
940     :default: ``''``
942     Since release 2.5.0 you can store your :term:`SQL` history, which means all
943     queries you entered manually into the phpMyAdmin interface. If you don't
944     want to use a table-based history, you can use the JavaScript-based
945     history.
947     Using that, all your history items are deleted when closing the window.
948     Using :config:option:`$cfg['QueryHistoryMax']` you can specify an amount of
949     history items you want to have on hold. On every login, this list gets cut
950     to the maximum amount.
952     The query history is only available if JavaScript is enabled in
953     your browser.
955     To allow the usage of this functionality:
957     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
958     * put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
959       ``pma__history``)
961     This feature can be disabled by setting the configuration to ``false``.
963 .. _recent:
964 .. config:option:: $cfg['Servers'][$i]['recent']
966     :type: string or false
967     :default: ``''``
969     Since release 3.5.0 you can show recently used tables in the
970     navigation panel. It helps you to jump across table directly, without
971     the need to select the database, and then select the table. Using
972     :config:option:`$cfg['NumRecentTables']` you can configure the maximum number
973     of recent tables shown. When you select a table from the list, it will jump to
974     the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
976     Without configuring the storage, you can still access the recently used tables,
977     but it will disappear after you logout.
979     To allow the usage of this functionality persistently:
981     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
982     * put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
983       ``pma__recent``)
985     This feature can be disabled by setting the configuration to ``false``.
987 .. _favorite:
988 .. config:option:: $cfg['Servers'][$i]['favorite']
990     :type: string or false
991     :default: ``''``
993     Since release 4.2.0 you can show a list of selected tables in the
994     navigation panel. It helps you to jump to the table directly, without
995     the need to select the database, and then select the table. When you
996     select a table from the list, it will jump to the page specified in
997     :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
999     You can add tables to this list or remove tables from it in database
1000     structure page by clicking on the star icons next to table names. Using
1001     :config:option:`$cfg['NumFavoriteTables']` you can configure the maximum
1002     number of favorite tables shown.
1004     Without configuring the storage, you can still access the favorite tables,
1005     but it will disappear after you logout.
1007     To allow the usage of this functionality persistently:
1009     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1010     * put the table name in :config:option:`$cfg['Servers'][$i]['favorite']` (e.g.
1011       ``pma__favorite``)
1013     This feature can be disabled by setting the configuration to ``false``.
1015 .. _table_uiprefs:
1016 .. config:option:: $cfg['Servers'][$i]['table_uiprefs']
1018     :type: string or false
1019     :default: ``''``
1021     Since release 3.5.0 phpMyAdmin can be configured to remember several
1022     things (sorted column :config:option:`$cfg['RememberSorting']`, column order,
1023     and column visibility from a database table) for browsing tables. Without
1024     configuring the storage, these features still can be used, but the values will
1025     disappear after you logout.
1027     To allow the usage of these functionality persistently:
1029     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1030     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
1031       ``pma__table_uiprefs``)
1033     This feature can be disabled by setting the configuration to ``false``.
1035 .. config:option:: $cfg['Servers'][$i]['users']
1037     :type: string or false
1038     :default: ``''``
1040 .. config:option:: $cfg['Servers'][$i]['usergroups']
1042     :type: string or false
1043     :default: ``''``
1045     Since release 4.1.0 you can create different user groups with menu items
1046     attached to them. Users can be assigned to these groups and the logged in
1047     user would only see menu items configured to the usergroup they are assigned to.
1048     To do this it needs two tables "usergroups" (storing allowed menu items for each
1049     user group) and "users" (storing users and their assignments to user groups).
1051     To allow the usage of this functionality:
1053     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1054     * put the correct table names in
1055       :config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
1056       :config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
1058     This feature can be disabled by setting either of the configurations to ``false``.
1060     .. seealso:: :ref:`configurablemenus`
1062 .. _navigationhiding:
1063 .. config:option:: $cfg['Servers'][$i]['navigationhiding']
1065     :type: string or false
1066     :default: ``''``
1068     Since release 4.1.0 you can hide/show items in the navigation tree.
1070     To allow the usage of this functionality:
1072     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1073     * put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
1074       ``pma__navigationhiding``)
1076     This feature can be disabled by setting the configuration to ``false``.
1078 .. _central_columns:
1079 .. config:option:: $cfg['Servers'][$i]['central_columns']
1081     :type: string or false
1082     :default: ``''``
1084     Since release 4.3.0 you can have a central list of columns per database.
1085     You can add/remove columns to the list as per your requirement. These columns
1086     in the central list will be available to use while you create a new column for
1087     a table or create a table itself. You can select a column from central list
1088     while creating a new column, it will save you from writing the same column definition
1089     over again or from writing different names for similar column.
1091     To allow the usage of this functionality:
1093     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1094     * put the table name in :config:option:`$cfg['Servers'][$i]['central_columns']` (e.g.
1095       ``pma__central_columns``)
1097     This feature can be disabled by setting the configuration to ``false``.
1099 .. _designer_settings:
1100 .. config:option:: $cfg['Servers'][$i]['designer_settings']
1102     :type: string or false
1103     :default: ``''``
1105     Since release 4.5.0 your designer settings can be remembered.
1106     Your choice regarding 'Angular/Direct Links', 'Snap to Grid', 'Toggle Relation Lines',
1107     'Small/Big All', 'Move Menu' and 'Pin Text' can be remembered persistently.
1109     To allow the usage of this functionality:
1111     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1112     * put the table name in :config:option:`$cfg['Servers'][$i]['designer_settings']` (e.g.
1113       ``pma__designer_settings``)
1115     This feature can be disabled by setting the configuration to ``false``.
1117 .. _savedsearches:
1118 .. config:option:: $cfg['Servers'][$i]['savedsearches']
1120     :type: string or false
1121     :default: ``''``
1123     Since release 4.2.0 you can save and load query-by-example searches from the Database > Query panel.
1125     To allow the usage of this functionality:
1127     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1128     * put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g.
1129       ``pma__savedsearches``)
1131     This feature can be disabled by setting the configuration to ``false``.
1133 .. _export_templates:
1134 .. config:option:: $cfg['Servers'][$i]['export_templates']
1136     :type: string or false
1137     :default: ``''``
1139     Since release 4.5.0 you can save and load export templates.
1141     To allow the usage of this functionality:
1143     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1144     * put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g.
1145       ``pma__export_templates``)
1147     This feature can be disabled by setting the configuration to ``false``.
1149 .. _tracking:
1150 .. config:option:: $cfg['Servers'][$i]['tracking']
1152     :type: string or false
1153     :default: ``''``
1155     Since release 3.3.x a tracking mechanism is available. It helps you to
1156     track every :term:`SQL` command which is
1157     executed by phpMyAdmin. The mechanism supports logging of data
1158     manipulation and data definition statements. After enabling it you can
1159     create versions of tables.
1161     The creation of a version has two effects:
1163     * phpMyAdmin saves a snapshot of the table, including structure and
1164       indexes.
1165     * phpMyAdmin logs all commands which change the structure and/or data of
1166       the table and links these commands with the version number.
1168     Of course you can view the tracked changes. On the :guilabel:`Tracking`
1169     page a complete report is available for every version. For the report you
1170     can use filters, for example you can get a list of statements within a date
1171     range. When you want to filter usernames you can enter \* for all names or
1172     you enter a list of names separated by ','. In addition you can export the
1173     (filtered) report to a file or to a temporary database.
1175     To allow the usage of this functionality:
1177     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1178     * put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
1179       ``pma__tracking``)
1181     This feature can be disabled by setting the configuration to ``false``.
1183 .. _tracking2:
1184 .. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
1186     :type: boolean
1187     :default: false
1189     Whether the tracking mechanism creates versions for tables and views
1190     automatically.
1192     If this is set to true and you create a table or view with
1194     * CREATE TABLE ...
1195     * CREATE VIEW ...
1197     and no version exists for it, the mechanism will create a version for
1198     you automatically.
1200 .. _tracking3:
1201 .. config:option:: $cfg['Servers'][$i]['tracking_default_statements']
1203     :type: string
1204     :default: ``'CREATE TABLE,ALTER TABLE,DROP TABLE,RENAME TABLE,CREATE INDEX,DROP INDEX,INSERT,UPDATE,DELETE,TRUNCATE,REPLACE,CREATE VIEW,ALTER VIEW,DROP VIEW,CREATE DATABASE,ALTER DATABASE,DROP DATABASE'``
1206     Defines the list of statements the auto-creation uses for new
1207     versions.
1209 .. _tracking4:
1210 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_view']
1212     :type: boolean
1213     :default: true
1215     Whether a DROP VIEW IF EXISTS statement will be added as first line to
1216     the log when creating a view.
1218 .. _tracking5:
1219 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_table']
1221     :type: boolean
1222     :default: true
1224     Whether a DROP TABLE IF EXISTS statement will be added as first line
1225     to the log when creating a table.
1227 .. _tracking6:
1228 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_database']
1230     :type: boolean
1231     :default: true
1233     Whether a DROP DATABASE IF EXISTS statement will be added as first
1234     line to the log when creating a database.
1236 .. _userconfig:
1237 .. config:option:: $cfg['Servers'][$i]['userconfig']
1239     :type: string or false
1240     :default: ``''``
1242     Since release 3.4.x phpMyAdmin allows users to set most preferences by
1243     themselves and store them in the database.
1245     If you don't allow for storing preferences in
1246     :config:option:`$cfg['Servers'][$i]['pmadb']`, users can still personalize
1247     phpMyAdmin, but settings will be saved in browser's local storage, or, it
1248     is is unavailable, until the end of session.
1250     To allow the usage of this functionality:
1252     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1253     * put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
1255     This feature can be disabled by setting the configuration to ``false``.
1257 .. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
1259     :type: integer
1260     :default: 100
1262     Maximum number of rows saved in
1263     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` table.
1265     When tables are dropped or renamed,
1266     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` may contain invalid data
1267     (referring to tables which no longer exist). We only keep this number of newest
1268     rows in :config:option:`$cfg['Servers'][$i]['table_uiprefs']` and automatically
1269     delete older rows.
1271 .. config:option:: $cfg['Servers'][$i]['SessionTimeZone']
1273     :type: string
1274     :default: ``''``
1276     Sets the time zone used by phpMyAdmin. Leave blank to use the time zone of your
1277     database server. Possible values are explained at
1278     https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
1280     This is useful when your database server uses a time zone which is different from the
1281     time zone you want to use in phpMyAdmin.
1283 .. config:option:: $cfg['Servers'][$i]['AllowRoot']
1285     :type: boolean
1286     :default: true
1288     Whether to allow root access. This is just a shortcut for the
1289     :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` below.
1291 .. config:option:: $cfg['Servers'][$i]['AllowNoPassword']
1293     :type: boolean
1294     :default: false
1296     Whether to allow logins without a password. The default value of
1297     ``false`` for this parameter prevents unintended access to a MySQL
1298     server with was left with an empty password for root or on which an
1299     anonymous (blank) user is defined.
1301 .. _servers_allowdeny_order:
1302 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['order']
1304     :type: string
1305     :default: ``''``
1307     If your rule order is empty, then :term:`IP`
1308     authorization is disabled.
1310     If your rule order is set to
1311     ``'deny,allow'`` then the system applies all deny rules followed by
1312     allow rules. Access is allowed by default. Any client which does not
1313     match a Deny command or does match an Allow command will be allowed
1314     access to the server.
1316     If your rule order is set to ``'allow,deny'``
1317     then the system applies all allow rules followed by deny rules. Access
1318     is denied by default. Any client which does not match an Allow
1319     directive or does match a Deny directive will be denied access to the
1320     server.
1322     If your rule order is set to ``'explicit'``, authorization is
1323     performed in a similar fashion to rule order 'deny,allow', with the
1324     added restriction that your host/username combination **must** be
1325     listed in the *allow* rules, and not listed in the *deny* rules. This
1326     is the **most** secure means of using Allow/Deny rules, and was
1327     available in Apache by specifying allow and deny rules without setting
1328     any order.
1330     Please also see :config:option:`$cfg['TrustedProxies']` for
1331     detecting IP address behind proxies.
1333 .. _servers_allowdeny_rules:
1334 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['rules']
1336     :type: array of strings
1337     :default: array()
1339     The general format for the rules is as such:
1341     .. code-block:: none
1343         <'allow' | 'deny'> <username> [from] <ipmask>
1345     If you wish to match all users, it is possible to use a ``'%'`` as a
1346     wildcard in the *username* field.
1348     There are a few shortcuts you can
1349     use in the *ipmask* field as well (please note that those containing
1350     SERVER\_ADDRESS might not be available on all webservers):
1352     .. code-block:: none
1354         'all' -> 0.0.0.0/0
1355         'localhost' -> 127.0.0.1/8
1356         'localnetA' -> SERVER_ADDRESS/8
1357         'localnetB' -> SERVER_ADDRESS/16
1358         'localnetC' -> SERVER_ADDRESS/24
1360     Having an empty rule list is equivalent to either using ``'allow %
1361     from all'`` if your rule order is set to ``'deny,allow'`` or ``'deny %
1362     from all'`` if your rule order is set to ``'allow,deny'`` or
1363     ``'explicit'``.
1365     For the :term:`IP Address` matching
1366     system, the following work:
1368     * ``xxx.xxx.xxx.xxx`` (an exact :term:`IP Address`)
1369     * ``xxx.xxx.xxx.[yyy-zzz]`` (an :term:`IP Address` range)
1370     * ``xxx.xxx.xxx.xxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IP` addresses)
1372     But the following does not work:
1374     * ``xxx.xxx.xxx.xx[yyy-zzz]`` (partial :term:`IP` address range)
1376     For :term:`IPv6` addresses, the following work:
1378     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`` (an exact :term:`IPv6` address)
1379     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]`` (an :term:`IPv6` address range)
1380     * ``xxxx:xxxx:xxxx:xxxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IPv6` addresses)
1382     But the following does not work:
1384     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]`` (partial :term:`IPv6` address range)
1386     Examples:
1388     .. code-block:: none
1390         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1391         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow bob from all');
1392         // Allow only 'bob' to connect from any host
1394         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1395         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow mary from 192.168.100.[50-100]');
1396         // Allow only 'mary' to connect from host 192.168.100.50 through 192.168.100.100
1398         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1399         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow % from 192.168.[5-6].10');
1400         // Allow any user to connect from host 192.168.5.10 or 192.168.6.10
1402         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1403         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow root from 192.168.5.50','allow % from 192.168.6.10');
1404         // Allow any user to connect from 192.168.6.10, and additionally allow root to connect from 192.168.5.50
1406 .. config:option:: $cfg['Servers'][$i]['DisableIS']
1408     :type: boolean
1409     :default: false
1411     Disable using ``INFORMATION_SCHEMA`` to retrieve information (use
1412     ``SHOW`` commands instead), because of speed issues when many
1413     databases are present.
1415     .. note::
1417         Enabling this option might give you a big performance boost on older
1418         MySQL servers.
1420 .. config:option:: $cfg['Servers'][$i]['SignonScript']
1422     :type: string
1423     :default: ``''``
1425     .. versionadded:: 3.5.0
1427     Name of PHP script to be sourced and executed to obtain login
1428     credentials. This is alternative approach to session based single
1429     signon. The script has to provide a function called
1430     ``get_login_credentials`` which returns list of username and
1431     password, accepting single parameter of existing username (can be
1432     empty). See :file:`examples/signon-script.php` for an example:
1434     .. literalinclude:: ../examples/signon-script.php
1435         :language: php
1437     .. seealso:: :ref:`auth_signon`
1439 .. config:option:: $cfg['Servers'][$i]['SignonSession']
1441     :type: string
1442     :default: ``''``
1444     Name of session which will be used for signon authentication method.
1445     You should use something different than ``phpMyAdmin``, because this
1446     is session which phpMyAdmin uses internally. Takes effect only if
1447     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
1449     .. seealso:: :ref:`auth_signon`
1451 .. config:option:: $cfg['Servers'][$i]['SignonCookieParams']
1453     :type: array
1454     :default: ``array()``
1456     .. versionadded:: 4.7.0
1458     An associative array of session cookie parameters of other authentication system.
1459     It is not needed if the other system doesn't use session_set_cookie_params().
1460     Keys should include 'lifetime', 'path', 'domain', 'secure' or 'httponly'.
1461     Valid values are mentioned in `session_get_cookie_params <https://www.php.net/manual/en/
1462     function.session-get-cookie-params.php>`_, they should be set to same values as the
1463     other application uses. Takes effect only if
1464     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
1466     .. seealso:: :ref:`auth_signon`
1468 .. config:option:: $cfg['Servers'][$i]['SignonURL']
1470     :type: string
1471     :default: ``''``
1473     :term:`URL` where user will be redirected
1474     to log in for signon authentication method. Should be absolute
1475     including protocol.
1477     .. seealso:: :ref:`auth_signon`
1479 .. config:option:: $cfg['Servers'][$i]['LogoutURL']
1481     :type: string
1482     :default: ``''``
1484     :term:`URL` where user will be redirected
1485     after logout (doesn't affect config authentication method). Should be
1486     absolute including protocol.
1488 Generic settings
1489 ----------------
1491 .. config:option:: $cfg['DisableShortcutKeys']
1493     :type: boolean
1494     :default: false
1496     You can disable phpMyAdmin shortcut keys by setting :config:option:`$cfg['DisableShortcutKeys']` to false.
1498 .. config:option:: $cfg['ServerDefault']
1500     :type: integer
1501     :default: 1
1503     If you have more than one server configured, you can set
1504     :config:option:`$cfg['ServerDefault']` to any one of them to autoconnect to that
1505     server when phpMyAdmin is started, or set it to 0 to be given a list
1506     of servers without logging in.
1508     If you have only one server configured,
1509     :config:option:`$cfg['ServerDefault']` MUST be set to that server.
1511 .. config:option:: $cfg['VersionCheck']
1513     :type: boolean
1514     :default: true
1516     Enables check for latest versions using JavaScript on the main phpMyAdmin
1517     page or by directly accessing :file:`version_check.php`.
1519     .. note::
1521         This setting can be adjusted by your vendor.
1523 .. config:option:: $cfg['ProxyUrl']
1525     :type: string
1526     :default: ""
1528     The url of the proxy to be used when phpmyadmin needs to access the outside
1529     internet such as when retrieving the latest version info or submitting error
1530     reports.  You need this if the server where phpMyAdmin is installed does not
1531     have direct access to the internet.
1532     The format is: "hostname:portnumber"
1534 .. config:option:: $cfg['ProxyUser']
1536     :type: string
1537     :default: ""
1539     The username for authenticating with the proxy. By default, no
1540     authentication is performed. If a username is supplied, Basic
1541     Authentication will be performed. No other types of authentication
1542     are currently supported.
1544 .. config:option:: $cfg['ProxyPass']
1546     :type: string
1547     :default: ""
1549     The password for authenticating with the proxy.
1551 .. config:option:: $cfg['MaxDbList']
1553     :type: integer
1554     :default: 100
1556     The maximum number of database names to be displayed in the main panel's
1557     database list.
1559 .. config:option:: $cfg['MaxTableList']
1561     :type: integer
1562     :default: 250
1564     The maximum number of table names to be displayed in the main panel's
1565     list (except on the Export page).
1567 .. config:option:: $cfg['ShowHint']
1569     :type: boolean
1570     :default: true
1572     Whether or not to show hints (for example, hints when hovering over
1573     table headers).
1575 .. config:option:: $cfg['MaxCharactersInDisplayedSQL']
1577     :type: integer
1578     :default: 1000
1580     The maximum number of characters when a :term:`SQL` query is displayed. The
1581     default limit of 1000 should be correct to avoid the display of tons of
1582     hexadecimal codes that represent BLOBs, but some users have real
1583     :term:`SQL` queries that are longer than 1000 characters. Also, if a
1584     query's length exceeds this limit, this query is not saved in the history.
1586 .. config:option:: $cfg['PersistentConnections']
1588     :type: boolean
1589     :default: false
1591     Whether `persistent connections <https://www.php.net/manual/en/features
1592     .persistent-connections.php>`_ should be used or not. Works with
1593     following extensions:
1595     * mysql (`mysql\_pconnect <https://www.php.net/manual/en/function.mysql-
1596       pconnect.php>`_),
1597     * mysqli (requires PHP 5.3.0 or newer, `more information
1598       <https://www.php.net/manual/en/mysqli.persistconns.php>`_).
1600 .. config:option:: $cfg['ForceSSL']
1602     :type: boolean
1603     :default: false
1605     .. deprecated:: 4.6.0
1607         This setting is no longer available since phpMyAdmin 4.6.0. Please
1608         adjust your webserver instead.
1610     Whether to force using https while accessing phpMyAdmin. In a reverse
1611     proxy setup, setting this to ``true`` is not supported.
1613     .. note::
1615         In some setups (like separate SSL proxy or load balancer) you might
1616         have to set :config:option:`$cfg['PmaAbsoluteUri']` for correct
1617         redirection.
1619 .. config:option:: $cfg['ExecTimeLimit']
1621     :type: integer [number of seconds]
1622     :default: 300
1624     Set the number of seconds a script is allowed to run. If seconds is
1625     set to zero, no time limit is imposed. This setting is used while
1626     importing/exporting dump files but has
1627     no effect when PHP is running in safe mode.
1629 .. config:option:: $cfg['SessionSavePath']
1631     :type: string
1632     :default: ``''``
1634     Path for storing session data (`session\_save\_path PHP parameter
1635     <https://www.php.net/session_save_path>`_).
1637     .. warning::
1639         This folder should not be publicly accessible through the webserver,
1640         otherwise you risk leaking private data from your session.
1642 .. config:option:: $cfg['MemoryLimit']
1644     :type: string [number of bytes]
1645     :default: ``'-1'``
1647     Set the number of bytes a script is allowed to allocate. If set to
1648     ``'-1'``, no limit is imposed. If set to ``'0'``, no change of the
1649     memory limit is attempted and the :file:`php.ini` ``memory_limit`` is
1650     used.
1652     This setting is used while importing/exporting dump files
1653     so you definitely don't want to put here a too low
1654     value. It has no effect when PHP is running in safe mode.
1656     You can also use any string as in :file:`php.ini`, eg. '16M'. Ensure you
1657     don't omit the suffix (16 means 16 bytes!)
1659 .. config:option:: $cfg['SkipLockedTables']
1661     :type: boolean
1662     :default: false
1664     Mark used tables and make it possible to show databases with locked
1665     tables (since MySQL 3.23.30).
1667 .. config:option:: $cfg['ShowSQL']
1669     :type: boolean
1670     :default: true
1672     Defines whether :term:`SQL` queries
1673     generated by phpMyAdmin should be displayed or not.
1675 .. config:option:: $cfg['RetainQueryBox']
1677     :type: boolean
1678     :default: false
1680     Defines whether the :term:`SQL` query box
1681     should be kept displayed after its submission.
1683 .. config:option:: $cfg['CodemirrorEnable']
1685     :type: boolean
1686     :default: true
1688     Defines whether to use a Javascript code editor for SQL query boxes.
1689     CodeMirror provides syntax highlighting and line numbers.  However,
1690     middle-clicking for pasting the clipboard contents in some Linux
1691     distributions (such as Ubuntu) is not supported by all browsers.
1693 .. config:option:: $cfg['DefaultForeignKeyChecks']
1695     :type: string
1696     :default: ``'default'``
1698     Default value of the checkbox for foreign key checks, to disable/enable
1699     foreign key checks for certain queries. The possible values are ``'default'``,
1700     ``'enable'`` or ``'disable'``. If set to ``'default'``, the value of the
1701     MySQL variable ``FOREIGN_KEY_CHECKS`` is used.
1703 .. config:option:: $cfg['AllowUserDropDatabase']
1705     :type: boolean
1706     :default: false
1708     .. warning::
1710         This is not a security measure as there will be always ways to
1711         circumvent this. If you want to prohibit users from dropping databases,
1712         revoke their corresponding DROP privilege.
1714     Defines whether normal users (non-administrator) are allowed to delete
1715     their own database or not. If set as false, the link :guilabel:`Drop
1716     Database` will not be shown, and even a ``DROP DATABASE mydatabase`` will
1717     be rejected. Quite practical for :term:`ISP` 's with many customers.
1719     This limitation of :term:`SQL` queries is not as strict as when using MySQL
1720     privileges. This is due to nature of :term:`SQL` queries which might be
1721     quite complicated.  So this choice should be viewed as help to avoid
1722     accidental dropping rather than strict privilege limitation.
1724 .. config:option:: $cfg['Confirm']
1726     :type: boolean
1727     :default: true
1729     Whether a warning ("Are your really sure...") should be displayed when
1730     you're about to lose data.
1732 .. config:option:: $cfg['UseDbSearch']
1734     :type: boolean
1735     :default: true
1737     Define whether the "search string inside database" is enabled or not.
1739 .. config:option:: $cfg['IgnoreMultiSubmitErrors']
1741     :type: boolean
1742     :default: false
1744     Define whether phpMyAdmin will continue executing a multi-query
1745     statement if one of the queries fails. Default is to abort execution.
1747 .. config:option:: $cfg['enable_drag_drop_import']
1749     :type: boolean
1750     :default: true
1752     Whether or not the drag and drop import feature is enabled.
1753     When enabled, a user can drag a file in to their browser and phpMyAdmin will
1754     attempt to import the file.
1756 Cookie authentication options
1757 -----------------------------
1759 .. config:option:: $cfg['blowfish_secret']
1761     :type: string
1762     :default: ``''``
1764     The "cookie" auth\_type uses AES algorithm to encrypt the password. If you
1765     are using the "cookie" auth\_type, enter here a random passphrase of your
1766     choice. It will be used internally by the AES algorithm: you won’t be
1767     prompted for this passphrase.
1769     The secret should be 32 characters long. Using shorter will lead to weaker security
1770     of encrypted cookies, using longer will cause no harm.
1772     .. note::
1774         The configuration is called blowfish_secret for historical reasons as
1775         Blowfish algorithm was originally used to do the encryption.
1777     .. versionchanged:: 3.1.0
1778         Since version 3.1.0 phpMyAdmin can generate this on the fly, but it
1779         makes a bit weaker security as this generated secret is stored in
1780         session and furthermore it makes impossible to recall user name from
1781         cookie.
1783 .. config:option:: $cfg['LoginCookieRecall']
1785     :type: boolean
1786     :default: true
1788     Define whether the previous login should be recalled or not in cookie
1789     authentication mode.
1791     This is automatically disabled if you do not have
1792     configured :config:option:`$cfg['blowfish_secret']`.
1794 .. config:option:: $cfg['LoginCookieValidity']
1796     :type: integer [number of seconds]
1797     :default: 1440
1799     Define how long a login cookie is valid. Please note that php
1800     configuration option `session.gc\_maxlifetime
1801     <https://www.php.net/manual/en/session.configuration.php#ini.session.gc-
1802     maxlifetime>`_ might limit session validity and if the session is lost,
1803     the login cookie is also invalidated. So it is a good idea to set
1804     ``session.gc_maxlifetime`` at least to the same value of
1805     :config:option:`$cfg['LoginCookieValidity']`.
1807 .. config:option:: $cfg['LoginCookieStore']
1809     :type: integer [number of seconds]
1810     :default: 0
1812     Define how long login cookie should be stored in browser. Default 0
1813     means that it will be kept for existing session. This is recommended
1814     for not trusted environments.
1816 .. config:option:: $cfg['LoginCookieDeleteAll']
1818     :type: boolean
1819     :default: true
1821     If enabled (default), logout deletes cookies for all servers,
1822     otherwise only for current one. Setting this to false makes it easy to
1823     forget to log out from other server, when you are using more of them.
1825 .. _AllowArbitraryServer:
1826 .. config:option:: $cfg['AllowArbitraryServer']
1828     :type: boolean
1829     :default: false
1831     If enabled, allows you to log in to arbitrary servers using cookie
1832     authentication.
1834     .. note::
1836         Please use this carefully, as this may allow users access to MySQL servers
1837         behind the firewall where your :term:`HTTP` server is placed.
1838         See also :config:option:`$cfg['ArbitraryServerRegexp']`.
1840 .. config:option:: $cfg['ArbitraryServerRegexp']
1842     :type: string
1843     :default: ``''``
1845     Restricts the MySQL servers to which the user can log in when
1846     :config:option:`$cfg['AllowArbitraryServer']` is enabled by
1847     matching the :term:`IP` or the hostname of the MySQL server
1848     to the given regular expression. The regular expression must be enclosed
1849     with a delimiter character.
1851     It is recommended to include start and end symbols in the regullar
1852     expression, so that you can avoid partial matches on the string.
1854     **Examples:**
1856     .. code-block:: php
1858         // Allow connection to three listed servers:
1859         $cfg['ArbitraryServerRegexp'] = '/^(server|another|yetdifferent)$/';
1861         // Allow connection to range of IP addresses:
1862         $cfg['ArbitraryServerRegexp'] = '@^192\.168\.0\.[0-9]{1,}$@';
1864         // Allow connection to server name ending with -mysql:
1865         $cfg['ArbitraryServerRegexp'] = '@^[^:]\-mysql$@';
1867     .. note::
1869         The whole server name is matched, it can include port as well. Due to
1870         way MySQL is permissive in connection parameters, it is possible to use
1871         connection strings as ```server:3306-mysql```. This can be used to
1872         bypass regullar expression by the suffix, while connecting to another
1873         server.
1875 .. config:option:: $cfg['CaptchaLoginPublicKey']
1877     :type: string
1878     :default: ``''``
1880     The public key for the reCaptcha service that can be obtained from
1881     https://www.google.com/recaptcha/intro/v3.html.
1883     reCaptcha will be then used in :ref:`cookie`.
1885 .. config:option:: $cfg['CaptchaLoginPrivateKey']
1887     :type: string
1888     :default: ``''``
1890     The private key for the reCaptcha service that can be obtain from
1891     https://www.google.com/recaptcha/intro/v3.html.
1893     reCaptcha will be then used in :ref:`cookie`.
1895 Navigation panel setup
1896 ----------------------
1898 .. config:option:: $cfg['ShowDatabasesNavigationAsTree']
1900     :type: boolean
1901     :default: true
1903     In the navigation panel, replaces the database tree with a selector
1905 .. config:option:: $cfg['FirstLevelNavigationItems']
1907     :type: integer
1908     :default: 100
1910     The number of first level databases that can be displayed on each page
1911     of navigation tree.
1913 .. config:option:: $cfg['MaxNavigationItems']
1915     :type: integer
1916     :default: 50
1918     The number of items (tables, columns, indexes) that can be displayed on each
1919     page of the navigation tree.
1921 .. config:option:: $cfg['NavigationTreeEnableGrouping']
1923     :type: boolean
1924     :default: true
1926     Defines whether to group the databases based on a common prefix
1927     in their name :config:option:`$cfg['NavigationTreeDbSeparator']`.
1929 .. config:option:: $cfg['NavigationTreeDbSeparator']
1931     :type: string
1932     :default: ``'_'``
1934     The string used to separate the parts of the database name when
1935     showing them in a tree.
1937 .. config:option:: $cfg['NavigationTreeTableSeparator']
1939     :type: string or array
1940     :default: ``'__'``
1942     Defines a string to be used to nest table spaces. This means if you have
1943     tables like ``first__second__third`` this will be shown as a three-level
1944     hierarchy like: first > second > third.  If set to false or empty, the
1945     feature is disabled. NOTE: You should not use this separator at the
1946     beginning or end of a table name or multiple times after another without
1947     any other characters in between.
1949 .. config:option:: $cfg['NavigationTreeTableLevel']
1951     :type: integer
1952     :default: 1
1954     Defines how many sublevels should be displayed when splitting up
1955     tables by the above separator.
1957 .. config:option:: $cfg['NumRecentTables']
1959     :type: integer
1960     :default: 10
1962     The maximum number of recently used tables shown in the navigation
1963     panel. Set this to 0 (zero) to disable the listing of recent tables.
1965 .. config:option:: $cfg['NumFavoriteTables']
1967     :type: integer
1968     :default: 10
1970     The maximum number of favorite tables shown in the navigation
1971     panel. Set this to 0 (zero) to disable the listing of favorite tables.
1973 .. config:option:: $cfg['ZeroConf']
1975     :type: boolean
1976     :default: true
1978     Enables Zero Configuration mode in which the user will be offered a choice to
1979     create phpMyAdmin configuration storage in the current database
1980     or use the existing one, if already present.
1982     This setting has no effect if the phpMyAdmin configuration storage database
1983     is properly created and the related configuration directives (such as
1984     :config:option:`$cfg['Servers'][$i]['pmadb']` and so on) are configured.
1986 .. config:option:: $cfg['NavigationLinkWithMainPanel']
1988     :type: boolean
1989     :default: true
1991     Defines whether or not to link with main panel by highlighting
1992     the current database or table.
1994 .. config:option:: $cfg['NavigationDisplayLogo']
1996     :type: boolean
1997     :default: true
1999     Defines whether or not to display the phpMyAdmin logo at the top of
2000     the navigation panel.
2002 .. config:option:: $cfg['NavigationLogoLink']
2004     :type: string
2005     :default: ``'index.php'``
2007     Enter :term:`URL` where logo in the navigation panel will point to.
2008     For use especially with self made theme which changes this.
2009     For relative/internal URLs, you need to have leading `` ./ `` or trailing characters `` ? `` such as ``'./sql.php?'``.
2010     For external URLs, you should include URL protocol schemes (``http`` or ``https``) with absolute URLs.
2012 .. config:option:: $cfg['NavigationLogoLinkWindow']
2014     :type: string
2015     :default: ``'main'``
2017     Whether to open the linked page in the main window (``main``) or in a
2018     new one (``new``). Note: use ``new`` if you are linking to
2019     ``phpmyadmin.net``.
2021 .. config:option:: $cfg['NavigationTreeDisplayItemFilterMinimum']
2023     :type: integer
2024     :default: 30
2026     Defines the minimum number of items (tables, views, routines and
2027     events) to display a JavaScript filter box above the list of items in
2028     the navigation tree.
2030     To disable the filter completely some high number can be used (e.g. 9999)
2032 .. config:option:: $cfg['NavigationTreeDisplayDbFilterMinimum']
2034     :type: integer
2035     :default: 30
2037     Defines the minimum number of databases to display a JavaScript filter
2038     box above the list of databases in the navigation tree.
2040     To disable the filter completely some high number can be used
2041     (e.g. 9999)
2043 .. config:option:: $cfg['NavigationDisplayServers']
2045     :type: boolean
2046     :default: true
2048     Defines whether or not to display a server choice at the top of the
2049     navigation panel.
2051 .. config:option:: $cfg['DisplayServersList']
2053     :type: boolean
2054     :default: false
2056     Defines whether to display this server choice as links instead of in a
2057     drop-down.
2059 .. config:option:: $cfg['NavigationTreeDefaultTabTable']
2061     :type: string
2062     :default: ``'structure'``
2064     Defines the tab displayed by default when clicking the small icon next
2065     to each table name in the navigation panel. The possible values are the
2066     localized equivalent of:
2068     * ``structure``
2069     * ``sql``
2070     * ``search``
2071     * ``insert``
2072     * ``browse``
2074 .. config:option:: $cfg['NavigationTreeDefaultTabTable2']
2076     :type: string
2077     :default: null
2079     Defines the tab displayed by default when clicking the second small icon next
2080     to each table name in the navigation panel. The possible values are the
2081     localized equivalent of:
2083     * ``(empty)``
2084     * ``structure``
2085     * ``sql``
2086     * ``search``
2087     * ``insert``
2088     * ``browse``
2090 .. config:option:: $cfg['NavigationTreeEnableExpansion']
2092     :type: boolean
2093     :default: true
2095     Whether to offer the possibility of tree expansion in the navigation panel.
2097 .. config:option:: $cfg['NavigationTreeShowTables']
2099     :type: boolean
2100     :default: true
2102     Whether to show tables under database in the navigation panel.
2104 .. config:option:: $cfg['NavigationTreeShowViews']
2106     :type: boolean
2107     :default: true
2109     Whether to show views under database in the navigation panel.
2111 .. config:option:: $cfg['NavigationTreeShowFunctions']
2113     :type: boolean
2114     :default: true
2116     Whether to show functions under database in the navigation panel.
2118 .. config:option:: $cfg['NavigationTreeShowProcedures']
2120     :type: boolean
2121     :default: true
2123     Whether to show procedures under database in the navigation panel.
2125 .. config:option:: $cfg['NavigationTreeShowEvents']
2127     :type: boolean
2128     :default: true
2130     Whether to show events under database in the navigation panel.
2132 .. config:option:: $cfg['NavigationWidth']
2134     :type: integer
2135     :default: 240
2137     Navigation panel width, set to 0 to collapse it by default.
2139 Main panel
2140 ----------
2142 .. config:option:: $cfg['ShowStats']
2144     :type: boolean
2145     :default: true
2147     Defines whether or not to display space usage and statistics about
2148     databases and tables. Note that statistics requires at least MySQL
2149     3.23.3 and that, at this date, MySQL doesn't return such information
2150     for Berkeley DB tables.
2152 .. config:option:: $cfg['ShowServerInfo']
2154     :type: boolean
2155     :default: true
2157     Defines whether to display detailed server information on main page.
2158     You can additionally hide more information by using
2159     :config:option:`$cfg['Servers'][$i]['verbose']`.
2161 .. config:option:: $cfg['ShowPhpInfo']
2163     :type: boolean
2164     :default: false
2166     Defines whether to display the :guilabel:`PHP information` or not at
2167     the starting main (right) frame.
2169     Please note that to block the usage of ``phpinfo()`` in scripts, you have to
2170     put this in your :file:`php.ini`:
2172     .. code-block:: ini
2174         disable_functions = phpinfo()
2176     .. warning::
2178         Enabling phpinfo page will leak quite a lot of information about server
2179         setup. Is it not recommended to enable this on shared installations.
2181         This might also make easier some remote attacks on your installations,
2182         so enable this only when needed.
2184 .. config:option:: $cfg['ShowChgPassword']
2186     :type: boolean
2187     :default: true
2189     Defines whether to display the :guilabel:`Change password` link or not at
2190     the starting main (right) frame. This setting does not check MySQL commands
2191     entered directly.
2193     Please note that enabling the :guilabel:`Change password` link has no effect
2194     with config authentication mode: because of the hard coded password value
2195     in the configuration file, end users can't be allowed to change their
2196     passwords.
2198 .. config:option:: $cfg['ShowCreateDb']
2200     :type: boolean
2201     :default: true
2203     Defines whether to display the form for creating database or not at the
2204     starting main (right) frame. This setting does not check MySQL commands
2205     entered directly.
2207 .. config:option:: $cfg['ShowGitRevision']
2209     :type: boolean
2210     :default: true
2212     Defines whether to display informations about the current Git revision (if
2213     applicable) on the main panel.
2215 .. config:option:: $cfg['MysqlMinVersion']
2217     :type: array
2219     Defines the minimum supported MySQL version. The default is chosen
2220     by the phpMyAdmin team; however this directive was asked by a developer
2221     of the Plesk control panel to ease integration with older MySQL servers
2222     (where most of the phpMyAdmin features work).
2224 Database structure
2225 ------------------
2227 .. config:option:: $cfg['ShowDbStructureCreation']
2229     :type: boolean
2230     :default: false
2232     Defines whether the database structure page (tables list) has a
2233     "Creation" column that displays when each table was created.
2235 .. config:option:: $cfg['ShowDbStructureLastUpdate']
2237     :type: boolean
2238     :default: false
2240     Defines whether the database structure page (tables list) has a "Last
2241     update" column that displays when each table was last updated.
2243 .. config:option:: $cfg['ShowDbStructureLastCheck']
2245     :type: boolean
2246     :default: false
2248     Defines whether the database structure page (tables list) has a "Last
2249     check" column that displays when each table was last checked.
2251 .. config:option:: $cfg['HideStructureActions']
2253     :type: boolean
2254     :default: true
2256     Defines whether the table structure actions are hidden under a "More"
2257     drop-down.
2259 .. config:option:: $cfg['ShowColumnComments']
2261     :type: boolean
2262     :default: true
2264     Defines whether to show column comments as a column in the table structure view.
2266 Browse mode
2267 -----------
2269 .. config:option:: $cfg['TableNavigationLinksMode']
2271     :type: string
2272     :default: ``'icons'``
2274     Defines whether the table navigation links contain ``'icons'``, ``'text'``
2275     or ``'both'``.
2277 .. config:option:: $cfg['ActionLinksMode']
2279     :type: string
2280     :default: ``'both'``
2282     If set to ``icons``, will display icons instead of text for db and table
2283     properties links (like :guilabel:`Browse`, :guilabel:`Select`,
2284     :guilabel:`Insert`, ...). Can be set to ``'both'``
2285     if you want icons AND text. When set to ``text``, will only show text.
2287 .. config:option:: $cfg['RowActionType']
2289     :type: string
2290     :default: ``'both'``
2292     Whether to display icons or text or both icons and text in table row action
2293     segment. Value can be either of ``'icons'``, ``'text'`` or ``'both'``.
2295 .. config:option:: $cfg['ShowAll']
2297     :type: boolean
2298     :default: false
2300     Defines whether a user should be displayed a "Show all" button in browse
2301     mode or not in all cases. By default it is shown only on small tables (less
2302     than 500 rows) to avoid performance issues while getting too many rows.
2304 .. config:option:: $cfg['MaxRows']
2306     :type: integer
2307     :default: 25
2309     Number of rows displayed when browsing a result set and no LIMIT
2310     clause is used. If the result set contains more rows, "Previous" and
2311     "Next" links will be shown. Possible values: 25,50,100,250,500.
2313 .. config:option:: $cfg['Order']
2315     :type: string
2316     :default: ``'SMART'``
2318     Defines whether columns are displayed in ascending (``ASC``) order, in
2319     descending (``DESC``) order or in a "smart" (``SMART``) order - I.E.
2320     descending order for columns of type TIME, DATE, DATETIME and
2321     TIMESTAMP, ascending order else- by default.
2323     .. versionchanged:: 3.4.0
2324         Since phpMyAdmin 3.4.0 the default value is ``'SMART'``.
2326 .. config:option:: $cfg['GridEditing']
2328     :type: string
2329     :default: ``'double-click'``
2331     Defines which action (``double-click`` or ``click``) triggers grid
2332     editing. Can be deactivated with the ``disabled`` value.
2334 .. config:option:: $cfg['RelationalDisplay']
2336     :type: string
2337     :default: ``'K'``
2339     Defines the initial behavior for Options > Relational. ``K``, which
2340     is the default, displays the key while ``D`` shows the display column.
2342 .. config:option:: $cfg['SaveCellsAtOnce']
2344     :type: boolean
2345     :default: false
2347     Defines whether or not to save all edited cells at once for grid
2348     editing.
2350 Editing mode
2351 ------------
2353 .. config:option:: $cfg['ProtectBinary']
2355     :type: boolean or string
2356     :default: ``'blob'``
2358     Defines whether ``BLOB`` or ``BINARY`` columns are protected from
2359     editing when browsing a table's content. Valid values are:
2361     * ``false`` to allow editing of all columns;
2362     * ``'blob'`` to allow editing of all columns except ``BLOBS``;
2363     * ``'noblob'`` to disallow editing of all columns except ``BLOBS`` (the
2364       opposite of ``'blob'``);
2365     * ``'all'`` to disallow editing of all ``BINARY`` or ``BLOB`` columns.
2367 .. config:option:: $cfg['ShowFunctionFields']
2369     :type: boolean
2370     :default: true
2372     Defines whether or not MySQL functions fields should be initially
2373     displayed in edit/insert mode. Since version 2.10, the user can toggle
2374     this setting from the interface.
2376 .. config:option:: $cfg['ShowFieldTypesInDataEditView']
2378     :type: boolean
2379     :default: true
2381     Defines whether or not type fields should be initially displayed in
2382     edit/insert mode. The user can toggle this setting from the interface.
2384 .. config:option:: $cfg['InsertRows']
2386     :type: integer
2387     :default: 2
2389     Defines the default number of rows to be entered from the Insert page.
2390     Users can manually change this from the bottom of that page to add or remove
2391     blank rows.
2393 .. config:option:: $cfg['ForeignKeyMaxLimit']
2395     :type: integer
2396     :default: 100
2398     If there are fewer items than this in the set of foreign keys, then a
2399     drop-down box of foreign keys is presented, in the style described by
2400     the :config:option:`$cfg['ForeignKeyDropdownOrder']` setting.
2402 .. config:option:: $cfg['ForeignKeyDropdownOrder']
2404     :type: array
2405     :default: array('content-id', 'id-content')
2407     For the foreign key drop-down fields, there are several methods of
2408     display, offering both the key and value data. The contents of the
2409     array should be one or both of the following strings: ``content-id``,
2410     ``id-content``.
2412 Export and import settings
2413 --------------------------
2415 .. config:option:: $cfg['ZipDump']
2417     :type: boolean
2418     :default: true
2420 .. config:option:: $cfg['GZipDump']
2422     :type: boolean
2423     :default: true
2425 .. config:option:: $cfg['BZipDump']
2427     :type: boolean
2428     :default: true
2430     Defines whether to allow the use of zip/GZip/BZip2 compression when
2431     creating a dump file
2433 .. config:option:: $cfg['CompressOnFly']
2435     :type: boolean
2436     :default: true
2438     Defines whether to allow on the fly compression for GZip/BZip2
2439     compressed exports. This doesn't affect smaller dumps and allows users
2440     to create larger dumps that won't otherwise fit in memory due to php
2441     memory limit. Produced files contain more GZip/BZip2 headers, but all
2442     normal programs handle this correctly.
2444 .. config:option:: $cfg['Export']
2446     :type: array
2447     :default: array(...)
2449     In this array are defined default parameters for export, names of
2450     items are similar to texts seen on export page, so you can easily
2451     identify what they mean.
2453 .. config:option:: $cfg['Export']['format']
2455     :type: string
2456     :default: ``'sql'``
2458     Default export format.
2460 .. config:option:: $cfg['Export']['method']
2462     :type: string
2463     :default: ``'quick'``
2465     Defines how the export form is displayed when it loads. Valid values
2466     are:
2468     * ``quick`` to display the minimum number of options to configure
2469     * ``custom`` to display every available option to configure
2470     * ``custom-no-form`` same as ``custom`` but does not display the option
2471       of using quick export
2473 .. config:option:: $cfg['Export']['charset']
2475     :type: string
2476     :default: ``''``
2478     Defines charset for generated export. By default no charset conversion is
2479     done assuming UTF-8.
2481 .. config:option:: $cfg['Export']['file_template_table']
2483     :type: string
2484     :default: ``'@TABLE@'``
2486     Default filename template for table exports.
2488     .. seealso:: :ref:`faq6_27`
2490 .. config:option:: $cfg['Export']['file_template_database']
2492     :type: string
2493     :default: ``'@DATABASE@'``
2495     Default filename template for database exports.
2497     .. seealso:: :ref:`faq6_27`
2499 .. config:option:: $cfg['Export']['file_template_server']
2501     :type: string
2502     :default: ``'@SERVER@'``
2504     Default filename template for server exports.
2506     .. seealso:: :ref:`faq6_27`
2508 .. config:option:: $cfg['Import']
2510     :type: array
2511     :default: array(...)
2513     In this array are defined default parameters for import, names of
2514     items are similar to texts seen on import page, so you can easily
2515     identify what they mean.
2517 .. config:option:: $cfg['Import']['charset']
2519     :type: string
2520     :default: ``''``
2522     Defines charset for import. By default no charset conversion is done
2523     assuming UTF-8.
2525 Tabs display settings
2526 ---------------------
2528 .. config:option:: $cfg['TabsMode']
2530     :type: string
2531     :default: ``'both'``
2533     Defines whether the menu tabs contain ``'icons'``, ``'text'`` or ``'both'``.
2535 .. config:option:: $cfg['PropertiesNumColumns']
2537     :type: integer
2538     :default: 1
2540     How many columns will be utilized to display the tables on the database
2541     property view? When setting this to a value larger than 1, the type of the
2542     database will be omitted for more display space.
2544 .. config:option:: $cfg['DefaultTabServer']
2546     :type: string
2547     :default: ``'welcome'``
2549     Defines the tab displayed by default on server view. The possible values
2550     are the localized equivalent of:
2552     * ``welcome`` (recommended for multi-user setups)
2553     * ``databases``,
2554     * ``status``
2555     * ``variables``
2556     * ``privileges``
2558 .. config:option:: $cfg['DefaultTabDatabase']
2560     :type: string
2561     :default: ``'structure'``
2563     Defines the tab displayed by default on database view. The possible values
2564     are the localized equivalent of:
2566     * ``structure``
2567     * ``sql``
2568     * ``search``
2569     * ``operations``
2571 .. config:option:: $cfg['DefaultTabTable']
2573     :type: string
2574     :default: ``'browse'``
2576     Defines the tab displayed by default on table view. The possible values
2577     are the localized equivalent of:
2579     * ``structure``
2580     * ``sql``
2581     * ``search``
2582     * ``insert``
2583     * ``browse``
2585 PDF Options
2586 -----------
2588 .. config:option:: $cfg['PDFPageSizes']
2590     :type: array
2591     :default: ``array('A3', 'A4', 'A5', 'letter', 'legal')``
2593     Array of possible paper sizes for creating PDF pages.
2595     You should never need to change this.
2597 .. config:option:: $cfg['PDFDefaultPageSize']
2599     :type: string
2600     :default: ``'A4'``
2602     Default page size to use when creating PDF pages. Valid values are any
2603     listed in :config:option:`$cfg['PDFPageSizes']`.
2605 Languages
2606 ---------
2608 .. config:option:: $cfg['DefaultLang']
2610     :type: string
2611     :default: ``'en'``
2613     Defines the default language to use, if not browser-defined or user-
2614     defined. The corresponding language file needs to be in
2615     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
2617 .. config:option:: $cfg['DefaultConnectionCollation']
2619     :type: string
2620     :default: ``'utf8mb4_general_ci'``
2622     Defines the default connection collation to use, if not user-defined.
2623     See the `MySQL documentation for charsets
2624     <https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>`_
2625     for list of possible values.
2627 .. config:option:: $cfg['Lang']
2629     :type: string
2630     :default: not set
2632     Force language to use. The corresponding language file needs to be in
2633     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
2635 .. config:option:: $cfg['FilterLanguages']
2637     :type: string
2638     :default: ``''``
2640     Limit list of available languages to those matching the given regular
2641     expression. For example if you want only Czech and English, you should
2642     set filter to ``'^(cs|en)'``.
2644 .. config:option:: $cfg['RecodingEngine']
2646     :type: string
2647     :default: ``'auto'``
2649     You can select here which functions will be used for character set
2650     conversion. Possible values are:
2652     * auto - automatically use available one (first is tested iconv, then
2653       recode)
2654     * iconv - use iconv or libiconv functions
2655     * recode - use recode\_string function
2656     * mb - use :term:`mbstring` extension
2657     * none - disable encoding conversion
2659     Enabled charset conversion activates a pull-down menu in the Export
2660     and Import pages, to choose the character set when exporting a file.
2661     The default value in this menu comes from
2662     :config:option:`$cfg['Export']['charset']` and :config:option:`$cfg['Import']['charset']`.
2664 .. config:option:: $cfg['IconvExtraParams']
2666     :type: string
2667     :default: ``'//TRANSLIT'``
2669     Specify some parameters for iconv used in charset conversion. See
2670     `iconv documentation <https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentati
2671     on/libiconv-1.15/iconv_open.3.html>`_ for details. By default
2672     ``//TRANSLIT`` is used, so that invalid characters will be
2673     transliterated.
2675 .. config:option:: $cfg['AvailableCharsets']
2677     :type: array
2678     :default: array(...)
2680     Available character sets for MySQL conversion. You can add your own
2681     (any of supported by recode/iconv) or remove these which you don't
2682     use. Character sets will be shown in same order as here listed, so if
2683     you frequently use some of these move them to the top.
2685 Web server settings
2686 -------------------
2688 .. config:option:: $cfg['OBGzip']
2690     :type: string/boolean
2691     :default: ``'auto'``
2693     Defines whether to use GZip output buffering for increased speed in
2694     :term:`HTTP` transfers. Set to
2695     true/false for enabling/disabling. When set to 'auto' (string),
2696     phpMyAdmin tries to enable output buffering and will automatically
2697     disable it if your browser has some problems with buffering. IE6 with
2698     a certain patch is known to cause data corruption when having enabled
2699     buffering.
2701 .. config:option:: $cfg['TrustedProxies']
2703     :type: array
2704     :default: array()
2706     Lists proxies and HTTP headers which are trusted for
2707     :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`. This list is by
2708     default empty, you need to fill in some trusted proxy servers if you
2709     want to use rules for IP addresses behind proxy.
2711     The following example specifies that phpMyAdmin should trust a
2712     HTTP\_X\_FORWARDED\_FOR (``X-Forwarded-For``) header coming from the proxy
2713     1.2.3.4:
2715     .. code-block:: php
2717         $cfg['TrustedProxies'] = array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR');
2719     The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
2720     client's IP address as usual.
2722 .. config:option:: $cfg['GD2Available']
2724     :type: string
2725     :default: ``'auto'``
2727     Specifies whether GD >= 2 is available. If yes it can be used for MIME
2728     transformations. Possible values are:
2730     * auto - automatically detect
2731     * yes - GD 2 functions can be used
2732     * no - GD 2 function cannot be used
2734 .. config:option:: $cfg['CheckConfigurationPermissions']
2736     :type: boolean
2737     :default: true
2739     We normally check the permissions on the configuration file to ensure
2740     it's not world writable. However, phpMyAdmin could be installed on a
2741     NTFS filesystem mounted on a non-Windows server, in which case the
2742     permissions seems wrong but in fact cannot be detected. In this case a
2743     sysadmin would set this parameter to ``false``.
2745 .. config:option:: $cfg['LinkLengthLimit']
2747     :type: integer
2748     :default: 1000
2750     Limit for length of :term:`URL` in links.  When length would be above this
2751     limit, it is replaced by form with button. This is required as some web
2752     servers (:term:`IIS`) have problems with long :term:`URL` .
2754 .. config:option:: $cfg['CSPAllow']
2756     :type: string
2757     :default: ``''``
2759     Additional string to include in allowed script and image sources in Content
2760     Security Policy header.
2762     This can be useful when you want to include some external JavaScript files
2763     in :file:`config.footer.inc.php` or :file:`config.header.inc.php`, which
2764     would be normally not allowed by Content Security Policy.
2766     To allow some sites, just list them within the string:
2768     .. code-block:: php
2770         $cfg['CSPAllow'] = 'example.com example.net';
2772     .. versionadded:: 4.0.4
2774 .. config:option:: $cfg['DisableMultiTableMaintenance']
2776     :type: boolean
2777     :default: false
2779     In the database Structure page, it's possible to mark some tables then
2780     choose an operation like optimizing for many tables. This can slow
2781     down a server; therefore, setting this to ``true`` prevents this kind
2782     of multiple maintenance operation.
2784 Theme settings
2785 --------------
2787     Please directly modify :file:`themes/themename/layout.inc.php`, although
2788     your changes will be overwritten with the next update.
2790 Design customization
2791 --------------------
2793 .. config:option:: $cfg['NavigationTreePointerEnable']
2795     :type: boolean
2796     :default: true
2798     When set to true, hovering over an item in the navigation panel causes that item to be marked
2799     (the background is highlighted).
2801 .. config:option:: $cfg['BrowsePointerEnable']
2803     :type: boolean
2804     :default: true
2806     When set to true, hovering over a row in the Browse page causes that row to be marked (the background
2807     is highlighted).
2809 .. config:option:: $cfg['BrowseMarkerEnable']
2811     :type: boolean
2812     :default: true
2814     When set to true, a data row is marked (the background is highlighted) when the row is selected
2815     with the checkbox.
2817 .. config:option:: $cfg['LimitChars']
2819     :type: integer
2820     :default: 50
2822     Maximum number of characters shown in any non-numeric field on browse
2823     view. Can be turned off by a toggle button on the browse page.
2825 .. config:option:: $cfg['RowActionLinks']
2827     :type: string
2828     :default: ``'left'``
2830     Defines the place where table row links (Edit, Copy, Delete) would be
2831     put when tables contents are displayed (you may have them displayed at
2832     the left side, right side, both sides or nowhere).
2834 .. config:option:: $cfg['RowActionLinksWithoutUnique']
2836     :type: boolean
2837     :default: false
2839     Defines whether to show row links (Edit, Copy, Delete) and checkboxes
2840     for multiple row operations even when the selection does not have a :term:`unique key`.
2841     Using row actions in the absence of a unique key may result in different/more
2842     rows being affected since there is no guaranteed way to select the exact row(s).
2844 .. config:option:: $cfg['RememberSorting']
2846     :type: boolean
2847     :default: true
2849     If enabled, remember the sorting of each table when browsing them.
2851 .. config:option:: $cfg['TablePrimaryKeyOrder']
2853     :type: string
2854     :default: ``'NONE'``
2856     This defines the default sort order for the tables, having a :term:`primary key`,
2857     when there is no sort order defines externally.
2858     Acceptable values : ['NONE', 'ASC', 'DESC']
2860 .. config:option:: $cfg['ShowBrowseComments']
2862     :type: boolean
2863     :default: true
2865 .. config:option:: $cfg['ShowPropertyComments']
2867     :type: boolean
2868     :default: true
2870     By setting the corresponding variable to ``true`` you can enable the
2871     display of column comments in Browse or Property display. In browse
2872     mode, the comments are shown inside the header. In property mode,
2873     comments are displayed using a CSS-formatted dashed-line below the
2874     name of the column. The comment is shown as a tool-tip for that
2875     column.
2877 .. config:option:: $cfg['FirstDayOfCalendar']
2879     :type: integer
2880     :default: 0
2882     This will define the first day of week in the calendar. The number
2883     can be set from 0 to 6, which represents the seven days of the week,
2884     Sunday to Saturday respectively. This value can also be configured by the user
2885     in server settings -> features -> general -> First Day calendar field.
2887 Text fields
2888 -----------
2890 .. config:option:: $cfg['CharEditing']
2892     :type: string
2893     :default: ``'input'``
2895     Defines which type of editing controls should be used for CHAR and
2896     VARCHAR columns. Applies to data editing and also to the default values
2897     in structure editing. Possible values are:
2899     * input - this allows to limit size of text to size of columns in MySQL,
2900       but has problems with newlines in columns
2901     * textarea - no problems with newlines in columns, but also no length
2902       limitations
2904 .. config:option:: $cfg['MinSizeForInputField']
2906     :type: integer
2907     :default: 4
2909     Defines the minimum size for input fields generated for CHAR and
2910     VARCHAR columns.
2912 .. config:option:: $cfg['MaxSizeForInputField']
2914     :type: integer
2915     :default: 60
2917     Defines the maximum size for input fields generated for CHAR and
2918     VARCHAR columns.
2920 .. config:option:: $cfg['TextareaCols']
2922     :type: integer
2923     :default: 40
2925 .. config:option:: $cfg['TextareaRows']
2927     :type: integer
2928     :default: 15
2930 .. config:option:: $cfg['CharTextareaCols']
2932     :type: integer
2933     :default: 40
2935 .. config:option:: $cfg['CharTextareaRows']
2937     :type: integer
2938     :default: 2
2940     Number of columns and rows for the textareas. This value will be
2941     emphasized (\*2) for :term:`SQL` query
2942     textareas and (\*1.25) for :term:`SQL`
2943     textareas inside the query window.
2945     The Char\* values are used for CHAR
2946     and VARCHAR editing (if configured via :config:option:`$cfg['CharEditing']`).
2948 .. config:option:: $cfg['LongtextDoubleTextarea']
2950     :type: boolean
2951     :default: true
2953     Defines whether textarea for LONGTEXT columns should have double size.
2955 .. config:option:: $cfg['TextareaAutoSelect']
2957     :type: boolean
2958     :default: false
2960     Defines if the whole textarea of the query box will be selected on
2961     click.
2963 .. config:option:: $cfg['EnableAutocompleteForTablesAndColumns']
2965     :type: boolean
2966     :default: true
2968     Whether to enable autocomplete for table and column names in any
2969     SQL query box.
2971 SQL query box settings
2972 ----------------------
2974 .. config:option:: $cfg['SQLQuery']['Edit']
2976     :type: boolean
2977     :default: true
2979     Whether to display an edit link to change a query in any SQL Query
2980     box.
2982 .. config:option:: $cfg['SQLQuery']['Explain']
2984     :type: boolean
2985     :default: true
2987     Whether to display a link to explain a SELECT query in any SQL Query
2988     box.
2990 .. config:option:: $cfg['SQLQuery']['ShowAsPHP']
2992     :type: boolean
2993     :default: true
2995     Whether to display a link to wrap a query in PHP code in any SQL Query
2996     box.
2998 .. config:option:: $cfg['SQLQuery']['Refresh']
3000     :type: boolean
3001     :default: true
3003     Whether to display a link to refresh a query in any SQL Query box.
3005 .. _web-dirs:
3007 Web server upload/save/import directories
3008 -----------------------------------------
3010 If PHP is running in safe mode, all directories must be owned by the same user
3011 as the owner of the phpMyAdmin scripts.
3013 If the directory where phpMyAdmin is installed is subject to an
3014 ``open_basedir`` restriction, you need to create a temporary directory in some
3015 directory accessible by the PHP interpreter.
3017 For security reasons, all directories should be outside the tree published by
3018 webserver. If you cannot avoid having this directory published by webserver,
3019 limit access to it either by web server configuration (for example using
3020 .htaccess or web.config files) or place at least an empty :file:`index.html`
3021 file there, so that directory listing is not possible. However as long as the
3022 directory is accessible by web server, an attacker can guess filenames to download
3023 the files.
3025 .. config:option:: $cfg['UploadDir']
3027     :type: string
3028     :default: ``''``
3030     The name of the directory where :term:`SQL` files have been uploaded by
3031     other means than phpMyAdmin (for example, FTP). Those files are available
3032     under a drop-down box when you click the database or table name, then the
3033     Import tab.
3035     If
3036     you want different directory for each user, %u will be replaced with
3037     username.
3039     Please note that the file names must have the suffix ".sql"
3040     (or ".sql.bz2" or ".sql.gz" if support for compressed formats is
3041     enabled).
3043     This feature is useful when your file is too big to be
3044     uploaded via :term:`HTTP`, or when file
3045     uploads are disabled in PHP.
3047     .. warning::
3049         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3050         to setup this directory and how to make its usage secure.
3052     .. seealso::
3054         See :ref:`faq1_16` for alternatives.
3056 .. config:option:: $cfg['SaveDir']
3058     :type: string
3059     :default: ``''``
3061     The name of the webserver directory where exported files can be saved.
3063     If you want a different directory for each user, %u will be replaced with the
3064     username.
3066     Please note that the directory must exist and has to be writable for
3067     the user running webserver.
3069     .. warning::
3071         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3072         to setup this directory and how to make its usage secure.
3074 .. config:option:: $cfg['TempDir']
3076     :type: string
3077     :default: ``'./tmp/'``
3079     The name of the directory where temporary files can be stored. It is used
3080     for several purposes, currently:
3082     * The templates cache which speeds up page loading.
3083     * ESRI Shapefiles import, see :ref:`faq6_30`.
3084     * To work around limitations of ``open_basedir`` for uploaded files, see
3085       :ref:`faq1_11`.
3087     This directory should have as strict permissions as possible as the only
3088     user required to access this directory is the one who runs the webserver.
3089     If you have root privileges, simply make this user owner of this directory
3090     and make it accessible only by it:
3092     .. code-block:: sh
3094         chown www-data:www-data tmp
3095         chmod 700 tmp
3097     If you cannot change owner of the directory, you can achieve a similar
3098     setup using :term:`ACL`:
3100     .. code-block:: sh
3102         chmod 700 tmp
3103         setfacl -m "g:www-data:rwx" tmp
3104         setfacl -d -m "g:www-data:rwx" tmp
3106     If neither of above works for you, you can still make the directory
3107     :command:`chmod 777`, but it might impose risk of other users on system
3108     reading and writing data in this directory.
3110     .. warning::
3112         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3113         to setup this directory and how to make its usage secure.
3115 Various display setting
3116 -----------------------
3118 .. config:option:: $cfg['RepeatCells']
3120     :type: integer
3121     :default: 100
3123     Repeat the headers every X cells, or 0 to deactivate.
3125 .. config:option:: $cfg['QueryHistoryDB']
3127     :type: boolean
3128     :default: false
3130 .. config:option:: $cfg['QueryHistoryMax']
3132     :type: integer
3133     :default: 25
3135     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true``, all your
3136     Queries are logged to a table, which has to be created by you (see
3137     :config:option:`$cfg['Servers'][$i]['history']`). If set to false, all your
3138     queries will be appended to the form, but only as long as your window is
3139     opened they remain saved.
3141     When using the JavaScript based query window, it will always get updated
3142     when you click on a new table/db to browse and will focus if you click on
3143     :guilabel:`Edit SQL` after using a query. You can suppress updating the
3144     query window by checking the box :guilabel:`Do not overwrite this query
3145     from outside the window` below the query textarea. Then you can browse
3146     tables/databases in the background without losing the contents of the
3147     textarea, so this is especially useful when composing a query with tables
3148     you first have to look in. The checkbox will get automatically checked
3149     whenever you change the contents of the textarea. Please uncheck the button
3150     whenever you definitely want the query window to get updated even though
3151     you have made alterations.
3153     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true`` you can
3154     specify the amount of saved history items using
3155     :config:option:`$cfg['QueryHistoryMax']`.
3157 .. config:option:: $cfg['BrowseMIME']
3159     :type: boolean
3160     :default: true
3162     Enable :ref:`transformations`.
3164 .. config:option:: $cfg['MaxExactCount']
3166     :type: integer
3167     :default: 50000
3169     For InnoDB tables, determines for how large tables phpMyAdmin should
3170     get the exact row count using ``SELECT COUNT``. If the approximate row
3171     count as returned by ``SHOW TABLE STATUS`` is smaller than this value,
3172     ``SELECT COUNT`` will be used, otherwise the approximate count will be
3173     used.
3175     .. versionchanged:: 4.8.0
3177         The default value was lowered to 50000 for performance reasons.
3179     .. versionchanged:: 4.2.6
3181         The default value was changed to 500000.
3183     .. seealso:: :ref:`faq3_11`
3185 .. config:option:: $cfg['MaxExactCountViews']
3187     :type: integer
3188     :default: 0
3190     For VIEWs, since obtaining the exact count could have an impact on
3191     performance, this value is the maximum to be displayed, using a
3192     ``SELECT COUNT ... LIMIT``. Setting this to 0 bypasses any row
3193     counting.
3195 .. config:option:: $cfg['NaturalOrder']
3197     :type: boolean
3198     :default: true
3200     Sorts database and table names according to natural order (for
3201     example, t1, t2, t10). Currently implemented in the navigation panel
3202     and in Database view, for the table list.
3204 .. config:option:: $cfg['InitialSlidersState']
3206     :type: string
3207     :default: ``'closed'``
3209     If set to ``'closed'``, the visual sliders are initially in a closed
3210     state. A value of ``'open'`` does the reverse. To completely disable
3211     all visual sliders, use ``'disabled'``.
3213 .. config:option:: $cfg['UserprefsDisallow']
3215     :type: array
3216     :default: array()
3218     Contains names of configuration options (keys in ``$cfg`` array) that
3219     users can't set through user preferences. For possible values, refer
3220     to clases under :file:`libraries/classes/Config/Forms/User/`.
3222 .. config:option:: $cfg['UserprefsDeveloperTab']
3224     :type: boolean
3225     :default: false
3227     Activates in the user preferences a tab containing options for
3228     developers of phpMyAdmin.
3230 Page titles
3231 -----------
3233 .. config:option:: $cfg['TitleTable']
3235     :type: string
3236     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'``
3238 .. config:option:: $cfg['TitleDatabase']
3240     :type: string
3241     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'``
3243 .. config:option:: $cfg['TitleServer']
3245     :type: string
3246     :default: ``'@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'``
3248 .. config:option:: $cfg['TitleDefault']
3250     :type: string
3251     :default: ``'@HTTP_HOST@ | @PHPMYADMIN@'``
3253     Allows you to specify window's title bar. You can use :ref:`faq6_27`.
3255 Theme manager settings
3256 ----------------------
3258 .. config:option:: $cfg['ThemeManager']
3260     :type: boolean
3261     :default: true
3263     Enables user-selectable themes. See :ref:`faqthemes`.
3265 .. config:option:: $cfg['ThemeDefault']
3267     :type: string
3268     :default: ``'pmahomme'``
3270     The default theme (a subdirectory under :file:`./themes/`).
3272 .. config:option:: $cfg['ThemePerServer']
3274     :type: boolean
3275     :default: false
3277     Whether to allow different theme for each server.
3279 .. config:option:: $cfg['FontSize']
3281     :type: string
3282     :default: '82%'
3284     .. deprecated:: 5.0.0
3286         This setting was removed as the browser is more efficient,
3287         thus no need of this option.
3289     Font size to use, is applied in CSS.
3291 Default queries
3292 ---------------
3294 .. config:option:: $cfg['DefaultQueryTable']
3296     :type: string
3297     :default: ``'SELECT * FROM @TABLE@ WHERE 1'``
3299 .. config:option:: $cfg['DefaultQueryDatabase']
3301     :type: string
3302     :default: ``''``
3304     Default queries that will be displayed in query boxes when user didn't
3305     specify any. You can use standard :ref:`faq6_27`.
3307 MySQL settings
3308 --------------
3310 .. config:option:: $cfg['DefaultFunctions']
3312     :type: array
3313     :default: array(...)
3315     Functions selected by default when inserting/changing row, Functions
3316     are defined for meta types as (FUNC\_NUMBER, FUNC\_DATE, FUNC\_CHAR,
3317     FUNC\_SPATIAL, FUNC\_UUID) and for ``first_timestamp``, which is used
3318     for first timestamp column in table.
3320 Default options for Transformations
3321 -----------------------------------
3323 .. config:option:: $cfg['DefaultTransformations']
3325     :type: array
3326     :default: An array with below listed key-values
3328 .. config:option:: $cfg['DefaultTransformations']['Substring']
3330     :type: array
3331     :default: array(0, 'all', '…')
3333 .. config:option:: $cfg['DefaultTransformations']['Bool2Text']
3335     :type: array
3336     :default: array('T', 'F')
3338 .. config:option:: $cfg['DefaultTransformations']['External']
3340     :type: array
3341     :default: array(0, '-f /dev/null -i -wrap -q', 1, 1)
3343 .. config:option:: $cfg['DefaultTransformations']['PreApPend']
3345     :type: array
3346     :default: array('', '')
3348 .. config:option:: $cfg['DefaultTransformations']['Hex']
3350     :type: array
3351     :default: array('2')
3353 .. config:option:: $cfg['DefaultTransformations']['DateFormat']
3355     :type: array
3356     :default: array(0, '', 'local')
3358 .. config:option:: $cfg['DefaultTransformations']['Inline']
3360     :type: array
3361     :default: array('100', 100)
3363 .. config:option:: $cfg['DefaultTransformations']['TextImageLink']
3365     :type: array
3366     :default: array('', 100, 50)
3368 .. config:option:: $cfg['DefaultTransformations']['TextLink']
3370     :type: array
3371     :default: array('', '', '')
3373 Console settings
3374 ----------------
3376 .. note::
3378     These settings are mostly meant to be changed by user.
3380 .. config:option:: $cfg['Console']['StartHistory']
3382     :type: boolean
3383     :default: false
3385     Show query history at start
3387 .. config:option:: $cfg['Console']['AlwaysExpand']
3389     :type: boolean
3390     :default: false
3392     Always expand query messages
3394 .. config:option:: $cfg['Console']['CurrentQuery']
3396     :type: boolean
3397     :default: true
3399     Show current browsing query
3401 .. config:option:: $cfg['Console']['EnterExecutes']
3403     :type: boolean
3404     :default: false
3406     Execute queries on Enter and insert new line with Shift + Enter
3408 .. config:option:: $cfg['Console']['DarkTheme']
3410     :type: boolean
3411     :default: false
3413     Switch to dark theme
3415 .. config:option:: $cfg['Console']['Mode']
3417     :type: string
3418     :default: 'info'
3420     Console mode
3422 .. config:option:: $cfg['Console']['Height']
3424     :type: integer
3425     :default: 92
3427     Console height
3429 Developer
3430 ---------
3432 .. warning::
3434     These settings might have huge effect on performance or security.
3436 .. config:option:: $cfg['environment']
3438     :type: string
3439     :default: ``'production'``
3441     Sets the working environment.
3443     This only needs to be changed when you are developing phpMyAdmin itself.
3444     The ``development`` mode may display debug information in some places.
3446     Possible values are ``'production'`` or ``'development'``.
3448 .. config:option:: $cfg['DBG']
3450     :type: array
3451     :default: array(...)
3453 .. config:option:: $cfg['DBG']['sql']
3455     :type: boolean
3456     :default: false
3458     Enable logging queries and execution times to be
3459     displayed in the console's Debug SQL tab.
3461 .. config:option:: $cfg['DBG']['sqllog']
3463     :type: boolean
3464     :default: false
3466     Enable logging of queries and execution times to the syslog.
3467     Requires :config:option:`$cfg['DBG']['sql']` to be enabled.
3469 .. config:option:: $cfg['DBG']['demo']
3471     :type: boolean
3472     :default: false
3474     Enable to let server present itself as demo server.
3475     This is used for `phpMyAdmin demo server <https://www.phpmyadmin.net/try/>`_.
3477     It currently changes following behavior:
3479     * There is welcome message on the main page.
3480     * There is footer information about demo server and used git revision.
3481     * The setup script is enabled even with existing configuration.
3482     * The setup does not try to connect to the MySQL server.
3484 .. config:option:: $cfg['DBG']['simple2fa']
3486     :type: boolean
3487     :default: false
3489     Can be used for testing two-factor authentication using :ref:`simple2fa`.
3491 .. _config-examples:
3493 Examples
3494 --------
3496 See following configuration snippets for typical setups of phpMyAdmin.
3498 Basic example
3499 +++++++++++++
3501 Example configuration file, which can be copied to :file:`config.inc.php` to
3502 get some core configuration layout; it is distributed with phpMyAdmin as
3503 :file:`config.sample.inc.php`. Please note that it does not contain all
3504 configuration options, only the most frequently used ones.
3506 .. literalinclude:: ../config.sample.inc.php
3507    :language: php
3509 .. warning::
3511     Don't use the controluser 'pma' if it does not yet exist and don't use 'pmapass'
3512     as password.
3514 .. _example-signon:
3516 Example for signon authentication
3517 +++++++++++++++++++++++++++++++++
3519 This example uses :file:`examples/signon.php` to demonstrate usage of :ref:`auth_signon`:
3521 .. code-block:: php
3523     <?php
3524     $i = 0;
3525     $i++;
3526     $cfg['Servers'][$i]['extension']     = 'mysqli';
3527     $cfg['Servers'][$i]['auth_type']     = 'signon';
3528     $cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
3529     $cfg['Servers'][$i]['SignonURL']     = 'examples/signon.php';
3531 Example for IP address limited autologin
3532 ++++++++++++++++++++++++++++++++++++++++
3534 If you want to automatically login when accessing phpMyAdmin locally while asking
3535 for a password when accessing remotely, you can achieve it using following snippet:
3537 .. code-block:: php
3539     if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
3540         $cfg['Servers'][$i]['auth_type'] = 'config';
3541         $cfg['Servers'][$i]['user'] = 'root';
3542         $cfg['Servers'][$i]['password'] = 'yourpassword';
3543     } else {
3544         $cfg['Servers'][$i]['auth_type'] = 'cookie';
3545     }
3547 .. note::
3549     Filtering based on IP addresses isn't reliable over the internet, use it
3550     only for local address.
3552 Example for using multiple MySQL servers
3553 ++++++++++++++++++++++++++++++++++++++++
3555 You can configure any number of servers using :config:option:`$cfg['Servers']`,
3556 following example shows two of them:
3558 .. code-block:: php
3560     <?php
3561     $cfg['blowfish_secret']='multiServerExample70518';
3562     //any string of your choice
3563     $i = 0;
3565     $i++; // server 1 :
3566     $cfg['Servers'][$i]['auth_type'] = 'cookie';
3567     $cfg['Servers'][$i]['verbose']   = 'no1';
3568     $cfg['Servers'][$i]['host']      = 'localhost';
3569     $cfg['Servers'][$i]['extension'] = 'mysqli';
3570     // more options for #1 ...
3572     $i++; // server 2 :
3573     $cfg['Servers'][$i]['auth_type'] = 'cookie';
3574     $cfg['Servers'][$i]['verbose']   = 'no2';
3575     $cfg['Servers'][$i]['host']      = 'remote.host.addr';//or ip:'10.9.8.1'
3576     // this server must allow remote clients, e.g., host 10.9.8.%
3577     // not only in mysql.host but also in the startup configuration
3578     $cfg['Servers'][$i]['extension'] = 'mysqli';
3579     // more options for #2 ...
3581     // end of server sections
3582     $cfg['ServerDefault'] = 0; // to choose the server on startup
3584     // further general options ...
3586 .. _example-google-ssl:
3588 Google Cloud SQL with SSL
3589 +++++++++++++++++++++++++
3591 To connect to Google Could SQL, you currently need to disable certificate
3592 verification. This is caused by the certficate being issued for CN matching
3593 your instance name, but you connect to an IP address and PHP tries to match
3594 these two. With verfication you end up with error message like:
3596 .. code-block:: text
3598     Peer certificate CN=`api-project-851612429544:pmatest' did not match expected CN=`8.8.8.8'
3600 .. warning::
3602     With disabled verification your traffic is encrypted, but you're open to
3603     man in the middle attacks.
3605 To connect phpMyAdmin to Google Cloud SQL using SSL download the client and
3606 server certificates and tell phpMyAdmin to use them:
3608 .. code-block:: php
3610     // IP address of your instance
3611     $cfg['Servers'][$i]['host'] = '8.8.8.8';
3612     // Use SSL for connection
3613     $cfg['Servers'][$i]['ssl'] = true;
3614     // Client secret key
3615     $cfg['Servers'][$i]['ssl_key'] = '../client-key.pem';
3616     // Client certificate
3617     $cfg['Servers'][$i]['ssl_cert'] = '../client-cert.pem';
3618     // Server certification authority
3619     $cfg['Servers'][$i]['ssl_ca'] = '../server-ca.pem';
3620     // Disable SSL verification (see above note)
3621     $cfg['Servers'][$i]['ssl_verify'] = false;
3623 .. seealso::
3625     :ref:`ssl`,
3626     :config:option:`$cfg['Servers'][$i]['ssl']`,
3627     :config:option:`$cfg['Servers'][$i]['ssl_key']`,
3628     :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
3629     :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
3630     :config:option:`$cfg['Servers'][$i]['ssl_verify']`,
3631     <https://bugs.php.net/bug.php?id=72048>