Translated using Weblate (Arabic)
[phpmyadmin.git] / doc / config.rst
blob183b9f5ce9048c4213882221407300a8b68645ae
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 inteded 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
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.
222 Server connection settings
223 --------------------------
225 .. config:option:: $cfg['Servers']
227     :type: array
228     :default: one server array with settings listed below
230     Since version 1.4.2, phpMyAdmin supports the administration of multiple
231     MySQL servers. Therefore, a :config:option:`$cfg['Servers']`-array has been
232     added which contains the login information for the different servers. The
233     first :config:option:`$cfg['Servers'][$i]['host']` contains the hostname of
234     the first server, the second :config:option:`$cfg['Servers'][$i]['host']`
235     the hostname of the second server, etc. In
236     :file:`libraries/config.default.php`, there is only one section for server
237     definition, however you can put as many as you need in
238     :file:`config.inc.php`, copy that block or needed parts (you don't have to
239     define all settings, just those you need to change).
241     .. note::
243         The :config:option:`$cfg['Servers']` array starts with
244         $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. If you want more
245         than one server, just copy following section (including $i
246         incrementation) serveral times. There is no need to define full server
247         array, just define values you need to change.
249 .. config:option:: $cfg['Servers'][$i]['host']
251     :type: string
252     :default: ``'localhost'``
254     The hostname or :term:`IP` address of your $i-th MySQL-server. E.g.
255     ``localhost``.
257     Possible values are:
259     * hostname, e.g., ``'localhost'`` or ``'mydb.example.org'``
260     * IP address, e.g., ``'127.0.0.1'`` or ``'192.168.10.1'``
261     * IPv6 address, e.g. ``2001:cdba:0000:0000:0000:0000:3257:9652``
262     * dot - ``'.'``, i.e., use named pipes on windows systems
263     * empty - ``''``, disables this server
265     .. note::
267         The hostname ``localhost`` is handled specially by MySQL and it uses
268         the socket based connection protocol. To use TCP/IP networking, use an
269         IP address or hostname such as ``127.0.0.1`` or ``db.example.com``. You
270         can configure the path to the socket with
271         :config:option:`$cfg['Servers'][$i]['socket']`.
273     .. seealso::
275         :config:option:`$cfg['Servers'][$i]['port']`,
276         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
278 .. config:option:: $cfg['Servers'][$i]['port']
280     :type: string
281     :default: ``''``
283     The port-number of your $i-th MySQL-server. Default is 3306 (leave
284     blank).
286     .. note::
288        If you use ``localhost`` as the hostname, MySQL ignores this port number
289        and connects with the socket, so if you want to connect to a port
290        different from the default port, use ``127.0.0.1`` or the real hostname
291        in :config:option:`$cfg['Servers'][$i]['host']`.
293     .. seealso::
295         :config:option:`$cfg['Servers'][$i]['host']`,
296         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
298 .. config:option:: $cfg['Servers'][$i]['socket']
300     :type: string
301     :default: ``''``
303     The path to the socket to use. Leave blank for default. To determine
304     the correct socket, check your MySQL configuration or, using the
305     :command:`mysql` command–line client, issue the ``status`` command. Among the
306     resulting information displayed will be the socket used.
308     .. note::
310         This takes effect only if :config:option:`$cfg['Servers'][$i]['host']` is set
311         to ``localhost``.
313     .. seealso::
315         :config:option:`$cfg['Servers'][$i]['host']`,
316         <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
318 .. config:option:: $cfg['Servers'][$i]['ssl']
320     :type: boolean
321     :default: false
323     Whether to enable SSL for the connection between phpMyAdmin and the MySQL
324     server to secure the connection.
326     When using the ``'mysql'`` extension,
327     none of the remaining ``'ssl...'`` configuration options apply.
329     We strongly recommend the ``'mysqli'`` extension when using this option.
331     .. seealso::
333         :ref:`ssl`,
334         :ref:`example-google-ssl`,
335         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
336         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
337         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
338         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
339         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
340         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
342 .. config:option:: $cfg['Servers'][$i]['ssl_key']
344     :type: string
345     :default: NULL
347     Path to the client key file when using SSL for connecting to the MySQL
348     server. This is used to authenticate the client to the server.
350     For example:
352     .. code-block:: php
354         $cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/server-key.pem';
356     .. seealso::
358         :ref:`ssl`,
359         :ref:`example-google-ssl`,
360         :config:option:`$cfg['Servers'][$i]['ssl']`,
361         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
362         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
363         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
364         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
365         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
367 .. config:option:: $cfg['Servers'][$i]['ssl_cert']
369     :type: string
370     :default: NULL
372     Path to the client certificate file when using SSL for connecting to the
373     MySQL server. This is used to authenticate the client to the server.
375     .. seealso::
377         :ref:`ssl`,
378         :ref:`example-google-ssl`,
379         :config:option:`$cfg['Servers'][$i]['ssl']`,
380         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
381         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
382         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
383         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
384         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
386 .. config:option:: $cfg['Servers'][$i]['ssl_ca']
388     :type: string
389     :default: NULL
391     Path to the CA file when using SSL for connecting to the MySQL server.
393     .. seealso::
395         :ref:`ssl`,
396         :ref:`example-google-ssl`,
397         :config:option:`$cfg['Servers'][$i]['ssl']`,
398         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
399         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
400         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
401         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
402         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
404 .. config:option:: $cfg['Servers'][$i]['ssl_ca_path']
406     :type: string
407     :default: NULL
409     Directory containing trusted SSL CA certificates in PEM format.
411     .. seealso::
413         :ref:`ssl`,
414         :ref:`example-google-ssl`,
415         :config:option:`$cfg['Servers'][$i]['ssl']`,
416         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
417         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
418         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
419         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
420         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
422 .. config:option:: $cfg['Servers'][$i]['ssl_ciphers']
424     :type: string
425     :default: NULL
427     List of allowable ciphers for SSL connections to the MySQL server.
429     .. seealso::
431         :ref:`ssl`,
432         :ref:`example-google-ssl`,
433         :config:option:`$cfg['Servers'][$i]['ssl']`,
434         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
435         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
436         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
437         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
438         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
440 .. config:option:: $cfg['Servers'][$i]['ssl_verify']
442     :type: boolean
443     :default: true
445     .. versionadded:: 4.6.0
447         This is supported since phpMyAdmin 4.6.0.
449     If your PHP install uses the MySQL Native Driver (mysqlnd), your
450     MySQL server is 5.6 or later, and your SSL certificate is self-signed,
451     there is a chance your SSL connection will fail due to validation.
452     Setting this to ``false`` will disable the validation check.
454     Since PHP 5.6.0 it also verifies whether server name matches CN of its
455     certificate. There is currently no way to disable just this check without
456     disabling complete SSL verification.
458     .. warning::
460         Disabling the certificate verification defeats purpose of using SSL.
461         This will make the connection vulnerable to man in the middle attacks.
463     .. note::
465         This flag only works with PHP 5.6.16 or later.
467     .. seealso::
469         :ref:`ssl`,
470         :ref:`example-google-ssl`,
471         :config:option:`$cfg['Servers'][$i]['ssl']`,
472         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
473         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
474         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
475         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
476         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
477         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
479 .. config:option:: $cfg['Servers'][$i]['connect_type']
481     :type: string
482     :default: ``'tcp'``
484     .. deprecated:: 4.7.0
486        This setting is no longer used as of 4.7.0, since MySQL decides the
487        connection type based on host, so it could lead to unexpected results.
488        Please set :config:option:`$cfg['Servers'][$i]['host']` accordingly
489        instead.
491     What type connection to use with the MySQL server. Your options are
492     ``'socket'`` and ``'tcp'``. It defaults to tcp as that is nearly guaranteed
493     to be available on all MySQL servers, while sockets are not supported on
494     some platforms. To use the socket mode, your MySQL server must be on the
495     same machine as the Web server.
497 .. config:option:: $cfg['Servers'][$i]['compress']
499     :type: boolean
500     :default: false
502     Whether to use a compressed protocol for the MySQL server connection
503     or not (experimental).
505 .. _controlhost:
506 .. config:option:: $cfg['Servers'][$i]['controlhost']
508     :type: string
509     :default: ``''``
511     Permits to use an alternate host to hold the configuration storage
512     data.
514     .. seealso::
516         :config:option:`$cfg['Servers'][$i]['control_*']`
518 .. _controlport:
519 .. config:option:: $cfg['Servers'][$i]['controlport']
521     :type: string
522     :default: ``''``
524     Permits to use an alternate port to connect to the host that
525     holds the configuration storage.
527     .. seealso::
529         :config:option:`$cfg['Servers'][$i]['control_*']`
531 .. _controluser:
532 .. config:option:: $cfg['Servers'][$i]['controluser']
534     :type: string
535     :default: ``''``
537 .. config:option:: $cfg['Servers'][$i]['controlpass']
539     :type: string
540     :default: ``''``
542     This special account is used to access :ref:`linked-tables`.
543     You don't need it in single user case, but if phpMyAdmin is shared it
544     is recommended to give access to :ref:`linked-tables` only to this user
545     and configure phpMyAdmin to use it. All users will then be able to use
546     the features without need to have direct access to :ref:`linked-tables`.
548     .. versionchanged:: 2.2.5
549         those were called ``stduser`` and ``stdpass``
551     .. seealso::
553         :ref:`setup`,
554         :ref:`authentication_modes`,
555         :ref:`linked-tables`,
556         :config:option:`$cfg['Servers'][$i]['pmadb']`,
557         :config:option:`$cfg['Servers'][$i]['controlhost']`,
558         :config:option:`$cfg['Servers'][$i]['controlport']`,
559         :config:option:`$cfg['Servers'][$i]['control_*']`
561 .. config:option:: $cfg['Servers'][$i]['control_*']
563     :type: mixed
565     .. versionadded:: 4.7.0
567     You can change any MySQL connection setting for control link (used to
568     access :ref:`linked-tables`) using configuration prefixed with ``control_``.
570     This can be used to change any aspect of the control connection, which by
571     default uses same parameters as the user one.
573     For example you can configure SSL for the control connection:
575     .. code-block:: php
577         // Enable SSL
578         $cfg['Servers'][$i]['control_ssl'] = true;
579         // Client secret key
580         $cfg['Servers'][$i]['control_ssl_key'] = '../client-key.pem';
581         // Client certificate
582         $cfg['Servers'][$i]['control_ssl_cert'] = '../client-cert.pem';
583         // Server certification authority
584         $cfg['Servers'][$i]['control_ssl_ca'] = '../server-ca.pem';
586     .. seealso::
588         :config:option:`$cfg['Servers'][$i]['ssl']`,
589         :config:option:`$cfg['Servers'][$i]['ssl_key']`,
590         :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
591         :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
592         :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
593         :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
594         :config:option:`$cfg['Servers'][$i]['ssl_verify']`
596 .. config:option:: $cfg['Servers'][$i]['auth_type']
598     :type: string
599     :default: ``'cookie'``
601     Whether config or cookie or :term:`HTTP` or signon authentication should be
602     used for this server.
604     * 'config' authentication (``$auth_type = 'config'``) is the plain old
605       way: username and password are stored in :file:`config.inc.php`.
606     * 'cookie' authentication mode (``$auth_type = 'cookie'``) allows you to
607       log in as any valid MySQL user with the help of cookies.
608     * 'http' authentication allows you to log in as any
609       valid MySQL user via HTTP-Auth.
610     * 'signon' authentication mode (``$auth_type = 'signon'``) allows you to
611       log in from prepared PHP session data or using supplied PHP script.
613     .. seealso:: :ref:`authentication_modes`
615 .. _servers_auth_http_realm:
616 .. config:option:: $cfg['Servers'][$i]['auth_http_realm']
618     :type: string
619     :default: ``''``
621     When using auth\_type = ``http``, this field allows to define a custom
622     :term:`HTTP` Basic Auth Realm which will be displayed to the user. If not
623     explicitly specified in your configuration, a string combined of
624     "phpMyAdmin " and either :config:option:`$cfg['Servers'][$i]['verbose']` or
625     :config:option:`$cfg['Servers'][$i]['host']` will be used.
627 .. _servers_user:
628 .. config:option:: $cfg['Servers'][$i]['user']
630     :type: string
631     :default: ``'root'``
633 .. config:option:: $cfg['Servers'][$i]['password']
635     :type: string
636     :default: ``''``
638     When using :config:option:`$cfg['Servers'][$i]['auth_type']` set to
639     'config', this is the user/password-pair which phpMyAdmin will use to
640     connect to the MySQL server. This user/password pair is not needed when
641     :term:`HTTP` or cookie authentication is used
642     and should be empty.
644 .. _servers_nopassword:
645 .. config:option:: $cfg['Servers'][$i]['nopassword']
647     :type: boolean
648     :default: false
650     .. deprecated:: 4.7.0
652         This setting was removed as it can produce unexpected results.
654     Allow attempt to log in without password when a login with password
655     fails. This can be used together with http authentication, when
656     authentication is done some other way and phpMyAdmin gets user name
657     from auth and uses empty password for connecting to MySQL. Password
658     login is still tried first, but as fallback, no password method is
659     tried.
661 .. _servers_only_db:
662 .. config:option:: $cfg['Servers'][$i]['only_db']
664     :type: string or array
665     :default: ``''``
667     If set to a (an array of) database name(s), only this (these)
668     database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
669     this/these database(s) name(s) may contain MySQL wildcards characters
670     ("\_" and "%"): if you want to use literal instances of these
671     characters, escape them (I.E. use ``'my\_db'`` and not ``'my_db'``).
673     This setting is an efficient way to lower the server load since the
674     latter does not need to send MySQL requests to build the available
675     database list. But **it does not replace the privileges rules of the
676     MySQL database server**. If set, it just means only these databases
677     will be displayed but **not that all other databases can't be used.**
679     An example of using more that one database:
681     .. code-block:: php
683         $cfg['Servers'][$i]['only_db'] = array('db1', 'db2');
685     .. versionchanged:: 4.0.0
686         Previous versions permitted to specify the display order of
687         the database names via this directive.
689 .. config:option:: $cfg['Servers'][$i]['hide_db']
691     :type: string
692     :default: ``''``
694     Regular expression for hiding some databases from unprivileged users.
695     This only hides them from listing, but a user is still able to access
696     them (using, for example, the SQL query area). To limit access, use
697     the MySQL privilege system.  For example, to hide all databases
698     starting with the letter "a", use
700     .. code-block:: php
702         $cfg['Servers'][$i]['hide_db'] = '^a';
704     and to hide both "db1" and "db2" use
706     .. code-block:: php
708         $cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';
710     More information on regular expressions can be found in the `PCRE
711     pattern syntax
712     <https://www.php.net/manual/en/reference.pcre.pattern.syntax.php>`_ portion
713     of the PHP reference manual.
715 .. config:option:: $cfg['Servers'][$i]['verbose']
717     :type: string
718     :default: ``''``
720     Only useful when using phpMyAdmin with multiple server entries. If
721     set, this string will be displayed instead of the hostname in the
722     pull-down menu on the main page. This can be useful if you want to
723     show only certain databases on your system, for example. For HTTP
724     auth, all non-US-ASCII characters will be stripped.
726 .. config:option:: $cfg['Servers'][$i]['extension']
728     :type: string
729     :default: ``'mysqli'``
731     The PHP MySQL extension to use (``mysql`` or ``mysqli``).
733     It is recommended to use ``mysqli`` in all installations.
735 .. config:option:: $cfg['Servers'][$i]['pmadb']
737     :type: string
738     :default: ``''``
740     The name of the database containing the phpMyAdmin configuration
741     storage.
743     See the :ref:`linked-tables`  section in this document to see the benefits of
744     this feature, and for a quick way of creating this database and the needed
745     tables.
747     If you are the only user of this phpMyAdmin installation, you can use your
748     current database to store those special tables; in this case, just put your
749     current database name in :config:option:`$cfg['Servers'][$i]['pmadb']`. For a
750     multi-user installation, set this parameter to the name of your central
751     database containing the phpMyAdmin configuration storage.
753 .. _bookmark:
754 .. config:option:: $cfg['Servers'][$i]['bookmarktable']
756     :type: string or false
757     :default: ``''``
759     Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
760     can be useful for queries you often run. To allow the usage of this
761     functionality:
763     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
764     * enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
766     This feature can be disabled by setting the configuration to ``false``.
768 .. _relation:
769 .. config:option:: $cfg['Servers'][$i]['relation']
771     :type: string or false
772     :default: ``''``
774     Since release 2.2.4 you can describe, in a special 'relation' table,
775     which column is a key in another table (a foreign key). phpMyAdmin
776     currently uses this to:
778     * make clickable, when you browse the master table, the data values that
779       point to the foreign table;
780     * display in an optional tool-tip the "display column" when browsing the
781       master table, if you move the mouse to a column containing a foreign
782       key (use also the 'table\_info' table); (see :ref:`faqdisplay`)
783     * in edit/insert mode, display a drop-down list of possible foreign keys
784       (key value and "display column" are shown) (see :ref:`faq6_21`)
785     * display links on the table properties page, to check referential
786       integrity (display missing foreign keys) for each described key;
787     * in query-by-example, create automatic joins (see :ref:`faq6_6`)
788     * enable you to get a :term:`PDF` schema of
789       your database (also uses the table\_coords table).
791     The keys can be numeric or character.
793     To allow the usage of this functionality:
795     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
796     * put the relation table name in :config:option:`$cfg['Servers'][$i]['relation']`
797     * now as normal user open phpMyAdmin and for each one of your tables
798       where you want to use this feature, click :guilabel:`Structure/Relation view/`
799       and choose foreign columns.
801     This feature can be disabled by setting the configuration to ``false``.
803     .. note::
805         In the current version, ``master_db`` must be the same as ``foreign_db``.
806         Those columns have been put in future development of the cross-db
807         relations.
809 .. _table_info:
810 .. config:option:: $cfg['Servers'][$i]['table_info']
812     :type: string or false
813     :default: ``''``
815     Since release 2.3.0 you can describe, in a special 'table\_info'
816     table, which column is to be displayed as a tool-tip when moving the
817     cursor over the corresponding key. This configuration variable will
818     hold the name of this special table. To allow the usage of this
819     functionality:
821     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
822     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_info']` (e.g.
823       ``pma__table_info``)
824     * then for each table where you want to use this feature, click
825       "Structure/Relation view/Choose column to display" to choose the
826       column.
828     This feature can be disabled by setting the configuration to ``false``.
830     .. seealso:: :ref:`faqdisplay`
832 .. _table_coords:
833 .. config:option:: $cfg['Servers'][$i]['table_coords']
835     :type: string or false
836     :default: ``''``
838     The designer feature can save your page layout; by pressing the "Save page" or "Save page as"
839     button in the expanding designer menu, you can customize the layout and have it loaded the next
840     time you use the designer. That layout is stored in this table. Furthermore, this table is also
841     required for using the PDF relation export feature, see
842     :config:option:`$cfg['Servers'][$i]['pdf\_pages']` for additional details.
844 .. config:option:: $cfg['Servers'][$i]['pdf_pages']
846     :type: string or false
847     :default: ``''``
849     Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
850     showing the relations between your tables. Further, the designer interface
851     permits visually managing the relations. To do this it needs two tables
852     "pdf\_pages" (storing information about the available :term:`PDF` pages)
853     and "table\_coords" (storing coordinates where each table will be placed on
854     a :term:`PDF` schema output).  You must be using the "relation" feature.
856     To allow the usage of this functionality:
858     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
859     * put the correct table names in
860       :config:option:`$cfg['Servers'][$i]['table\_coords']` and
861       :config:option:`$cfg['Servers'][$i]['pdf\_pages']`
863     This feature can be disabled by setting either of the configurations to ``false``.
865     .. seealso:: :ref:`faqpdf`.
867 .. _col_com:
868 .. config:option:: $cfg['Servers'][$i]['column_info']
870     :type: string or false
871     :default: ``''``
873     This part requires a content update!  Since release 2.3.0 you can
874     store comments to describe each column for each table. These will then
875     be shown on the "printview".
877     Starting with release 2.5.0, comments are consequently used on the table
878     property pages and table browse view, showing up as tool-tips above the
879     column name (properties page) or embedded within the header of table in
880     browse view. They can also be shown in a table dump. Please see the
881     relevant configuration directives later on.
883     Also new in release 2.5.0 is a MIME- transformation system which is also
884     based on the following table structure. See :ref:`transformations` for
885     further information. To use the MIME- transformation system, your
886     column\_info table has to have the three new columns 'mimetype',
887     'transformation', 'transformation\_options'.
889     Starting with release 4.3.0, a new input-oriented transformation system
890     has been introduced. Also, backward compatibility code used in the old
891     transformations system was removed. As a result, an update to column\_info
892     table is necessary for previous transformations and the new input-oriented
893     transformation system to work. phpMyAdmin will upgrade it automatically
894     for you by analyzing your current column\_info table structure.
895     However, if something goes wrong with the auto-upgrade then you can
896     use the SQL script found in ``./sql/upgrade_column_info_4_3_0+.sql``
897     to upgrade it manually.
899     To allow the usage of this functionality:
901     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
902     * put the table name in :config:option:`$cfg['Servers'][$i]['column\_info']` (e.g.
903       ``pma__column_info``)
904     * to update your PRE-2.5.0 Column\_comments table use this:  and
905       remember that the Variable in :file:`config.inc.php` has been renamed from
906       :samp:`$cfg['Servers'][$i]['column\_comments']` to
907       :config:option:`$cfg['Servers'][$i]['column\_info']`
909       .. code-block:: mysql
911            ALTER TABLE `pma__column_comments`
912            ADD `mimetype` VARCHAR( 255 ) NOT NULL,
913            ADD `transformation` VARCHAR( 255 ) NOT NULL,
914            ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
915     * to update your PRE-4.3.0 Column\_info table manually use this
916       ``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
918     This feature can be disabled by setting the configuration to ``false``.
920     .. note::
922         For auto-upgrade functionality to work, your
923         :config:option:`$cfg['Servers'][$i]['controluser']` must have ALTER privilege on
924         ``phpmyadmin`` database. See the `MySQL documentation for GRANT
925         <https://dev.mysql.com/doc/refman/5.7/en/grant.html>`_ on how to
926         ``GRANT`` privileges to a user.
928 .. _history:
929 .. config:option:: $cfg['Servers'][$i]['history']
931     :type: string or false
932     :default: ``''``
934     Since release 2.5.0 you can store your :term:`SQL` history, which means all
935     queries you entered manually into the phpMyAdmin interface. If you don't
936     want to use a table-based history, you can use the JavaScript-based
937     history.
939     Using that, all your history items are deleted when closing the window.
940     Using :config:option:`$cfg['QueryHistoryMax']` you can specify an amount of
941     history items you want to have on hold. On every login, this list gets cut
942     to the maximum amount.
944     The query history is only available if JavaScript is enabled in
945     your browser.
947     To allow the usage of this functionality:
949     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
950     * put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
951       ``pma__history``)
953     This feature can be disabled by setting the configuration to ``false``.
955 .. _recent:
956 .. config:option:: $cfg['Servers'][$i]['recent']
958     :type: string or false
959     :default: ``''``
961     Since release 3.5.0 you can show recently used tables in the
962     navigation panel. It helps you to jump across table directly, without
963     the need to select the database, and then select the table. Using
964     :config:option:`$cfg['NumRecentTables']` you can configure the maximum number
965     of recent tables shown. When you select a table from the list, it will jump to
966     the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
968     Without configuring the storage, you can still access the recently used tables,
969     but it will disappear after you logout.
971     To allow the usage of this functionality persistently:
973     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
974     * put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
975       ``pma__recent``)
977     This feature can be disabled by setting the configuration to ``false``.
979 .. _favorite:
980 .. config:option:: $cfg['Servers'][$i]['favorite']
982     :type: string or false
983     :default: ``''``
985     Since release 4.2.0 you can show a list of selected tables in the
986     navigation panel. It helps you to jump to the table directly, without
987     the need to select the database, and then select the table. When you
988     select a table from the list, it will jump to the page specified in
989     :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
991     You can add tables to this list or remove tables from it in database
992     structure page by clicking on the star icons next to table names. Using
993     :config:option:`$cfg['NumFavoriteTables']` you can configure the maximum
994     number of favorite tables shown.
996     Without configuring the storage, you can still access the favorite tables,
997     but it will disappear after you logout.
999     To allow the usage of this functionality persistently:
1001     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1002     * put the table name in :config:option:`$cfg['Servers'][$i]['favorite']` (e.g.
1003       ``pma__favorite``)
1005     This feature can be disabled by setting the configuration to ``false``.
1007 .. _table_uiprefs:
1008 .. config:option:: $cfg['Servers'][$i]['table_uiprefs']
1010     :type: string or false
1011     :default: ``''``
1013     Since release 3.5.0 phpMyAdmin can be configured to remember several
1014     things (sorted column :config:option:`$cfg['RememberSorting']`, column order,
1015     and column visibility from a database table) for browsing tables. Without
1016     configuring the storage, these features still can be used, but the values will
1017     disappear after you logout.
1019     To allow the usage of these functionality persistently:
1021     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1022     * put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
1023       ``pma__table_uiprefs``)
1025     This feature can be disabled by setting the configuration to ``false``.
1027 .. config:option:: $cfg['Servers'][$i]['users']
1029     :type: string or false
1030     :default: ``''``
1032 .. config:option:: $cfg['Servers'][$i]['usergroups']
1034     :type: string or false
1035     :default: ``''``
1037     Since release 4.1.0 you can create different user groups with menu items
1038     attached to them. Users can be assigned to these groups and the logged in
1039     user would only see menu items configured to the usergroup he is assigned to.
1040     To do this it needs two tables "usergroups" (storing allowed menu items for each
1041     user group) and "users" (storing users and their assignments to user groups).
1043     To allow the usage of this functionality:
1045     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1046     * put the correct table names in
1047       :config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
1048       :config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
1050     This feature can be disabled by setting either of the configurations to ``false``.
1052     .. seealso:: :ref:`configurablemenus`
1054 .. _navigationhiding:
1055 .. config:option:: $cfg['Servers'][$i]['navigationhiding']
1057     :type: string or false
1058     :default: ``''``
1060     Since release 4.1.0 you can hide/show items in the navigation tree.
1062     To allow the usage of this functionality:
1064     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1065     * put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
1066       ``pma__navigationhiding``)
1068     This feature can be disabled by setting the configuration to ``false``.
1070 .. _central_columns:
1071 .. config:option:: $cfg['Servers'][$i]['central_columns']
1073     :type: string or false
1074     :default: ``''``
1076     Since release 4.3.0 you can have a central list of columns per database.
1077     You can add/remove columns to the list as per your requirement. These columns
1078     in the central list will be available to use while you create a new column for
1079     a table or create a table itself. You can select a column from central list
1080     while creating a new column, it will save you from writing the same column definition
1081     over again or from writing different names for similar column.
1083     To allow the usage of this functionality:
1085     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1086     * put the table name in :config:option:`$cfg['Servers'][$i]['central_columns']` (e.g.
1087       ``pma__central_columns``)
1089     This feature can be disabled by setting the configuration to ``false``.
1091 .. _designer_settings:
1092 .. config:option:: $cfg['Servers'][$i]['designer_settings']
1094     :type: string or false
1095     :default: ``''``
1097     Since release 4.5.0 your designer settings can be remembered.
1098     Your choice regarding 'Angular/Direct Links', 'Snap to Grid', 'Toggle Relation Lines',
1099     'Small/Big All', 'Move Menu' and 'Pin Text' can be remembered persistently.
1101     To allow the usage of this functionality:
1103     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1104     * put the table name in :config:option:`$cfg['Servers'][$i]['designer_settings']` (e.g.
1105       ``pma__designer_settings``)
1107     This feature can be disabled by setting the configuration to ``false``.
1109 .. _savedsearches:
1110 .. config:option:: $cfg['Servers'][$i]['savedsearches']
1112     :type: string or false
1113     :default: ``''``
1115     Since release 4.2.0 you can save and load query-by-example searches from the Database > Query panel.
1117     To allow the usage of this functionality:
1119     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1120     * put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g.
1121       ``pma__savedsearches``)
1123     This feature can be disabled by setting the configuration to ``false``.
1125 .. _export_templates:
1126 .. config:option:: $cfg['Servers'][$i]['export_templates']
1128     :type: string or false
1129     :default: ``''``
1131     Since release 4.5.0 you can save and load export templates.
1133     To allow the usage of this functionality:
1135     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1136     * put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g.
1137       ``pma__export_templates``)
1139     This feature can be disabled by setting the configuration to ``false``.
1141 .. _tracking:
1142 .. config:option:: $cfg['Servers'][$i]['tracking']
1144     :type: string or false
1145     :default: ``''``
1147     Since release 3.3.x a tracking mechanism is available. It helps you to
1148     track every :term:`SQL` command which is
1149     executed by phpMyAdmin. The mechanism supports logging of data
1150     manipulation and data definition statements. After enabling it you can
1151     create versions of tables.
1153     The creation of a version has two effects:
1155     * phpMyAdmin saves a snapshot of the table, including structure and
1156       indexes.
1157     * phpMyAdmin logs all commands which change the structure and/or data of
1158       the table and links these commands with the version number.
1160     Of course you can view the tracked changes. On the :guilabel:`Tracking`
1161     page a complete report is available for every version. For the report you
1162     can use filters, for example you can get a list of statements within a date
1163     range. When you want to filter usernames you can enter \* for all names or
1164     you enter a list of names separated by ','. In addition you can export the
1165     (filtered) report to a file or to a temporary database.
1167     To allow the usage of this functionality:
1169     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1170     * put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
1171       ``pma__tracking``)
1173     This feature can be disabled by setting the configuration to ``false``.
1175 .. _tracking2:
1176 .. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
1178     :type: boolean
1179     :default: false
1181     Whether the tracking mechanism creates versions for tables and views
1182     automatically.
1184     If this is set to true and you create a table or view with
1186     * CREATE TABLE ...
1187     * CREATE VIEW ...
1189     and no version exists for it, the mechanism will create a version for
1190     you automatically.
1192 .. _tracking3:
1193 .. config:option:: $cfg['Servers'][$i]['tracking_default_statements']
1195     :type: string
1196     :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'``
1198     Defines the list of statements the auto-creation uses for new
1199     versions.
1201 .. _tracking4:
1202 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_view']
1204     :type: boolean
1205     :default: true
1207     Whether a DROP VIEW IF EXISTS statement will be added as first line to
1208     the log when creating a view.
1210 .. _tracking5:
1211 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_table']
1213     :type: boolean
1214     :default: true
1216     Whether a DROP TABLE IF EXISTS statement will be added as first line
1217     to the log when creating a table.
1219 .. _tracking6:
1220 .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_database']
1222     :type: boolean
1223     :default: true
1225     Whether a DROP DATABASE IF EXISTS statement will be added as first
1226     line to the log when creating a database.
1228 .. _userconfig:
1229 .. config:option:: $cfg['Servers'][$i]['userconfig']
1231     :type: string or false
1232     :default: ``''``
1234     Since release 3.4.x phpMyAdmin allows users to set most preferences by
1235     themselves and store them in the database.
1237     If you don't allow for storing preferences in
1238     :config:option:`$cfg['Servers'][$i]['pmadb']`, users can still personalize
1239     phpMyAdmin, but settings will be saved in browser's local storage, or, it
1240     is is unavailable, until the end of session.
1242     To allow the usage of this functionality:
1244     * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
1245     * put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
1247     This feature can be disabled by setting the configuration to ``false``.
1249 .. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
1251     :type: integer
1252     :default: 100
1254     Maximum number of rows saved in
1255     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` table.
1257     When tables are dropped or renamed,
1258     :config:option:`$cfg['Servers'][$i]['table_uiprefs']` may contain invalid data
1259     (referring to tables which no longer exist). We only keep this number of newest
1260     rows in :config:option:`$cfg['Servers'][$i]['table_uiprefs']` and automatically
1261     delete older rows.
1263 .. config:option:: $cfg['Servers'][$i]['SessionTimeZone']
1265     :type: string
1266     :default: ``''``
1268     Sets the time zone used by phpMyAdmin. Leave blank to use the time zone of your
1269     database server. Possible values are explained at
1270     https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
1272     This is useful when your database server uses a time zone which is different from the
1273     time zone you want to use in phpMyAdmin.
1275 .. config:option:: $cfg['Servers'][$i]['AllowRoot']
1277     :type: boolean
1278     :default: true
1280     Whether to allow root access. This is just a shortcut for the
1281     :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` below.
1283 .. config:option:: $cfg['Servers'][$i]['AllowNoPassword']
1285     :type: boolean
1286     :default: false
1288     Whether to allow logins without a password. The default value of
1289     ``false`` for this parameter prevents unintended access to a MySQL
1290     server with was left with an empty password for root or on which an
1291     anonymous (blank) user is defined.
1293 .. _servers_allowdeny_order:
1294 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['order']
1296     :type: string
1297     :default: ``''``
1299     If your rule order is empty, then :term:`IP`
1300     authorization is disabled.
1302     If your rule order is set to
1303     ``'deny,allow'`` then the system applies all deny rules followed by
1304     allow rules. Access is allowed by default. Any client which does not
1305     match a Deny command or does match an Allow command will be allowed
1306     access to the server.
1308     If your rule order is set to ``'allow,deny'``
1309     then the system applies all allow rules followed by deny rules. Access
1310     is denied by default. Any client which does not match an Allow
1311     directive or does match a Deny directive will be denied access to the
1312     server.
1314     If your rule order is set to ``'explicit'``, authorization is
1315     performed in a similar fashion to rule order 'deny,allow', with the
1316     added restriction that your host/username combination **must** be
1317     listed in the *allow* rules, and not listed in the *deny* rules. This
1318     is the **most** secure means of using Allow/Deny rules, and was
1319     available in Apache by specifying allow and deny rules without setting
1320     any order.
1322     Please also see :config:option:`$cfg['TrustedProxies']` for
1323     detecting IP address behind proxies.
1325 .. _servers_allowdeny_rules:
1326 .. config:option:: $cfg['Servers'][$i]['AllowDeny']['rules']
1328     :type: array of strings
1329     :default: array()
1331     The general format for the rules is as such:
1333     .. code-block:: none
1335         <'allow' | 'deny'> <username> [from] <ipmask>
1337     If you wish to match all users, it is possible to use a ``'%'`` as a
1338     wildcard in the *username* field.
1340     There are a few shortcuts you can
1341     use in the *ipmask* field as well (please note that those containing
1342     SERVER\_ADDRESS might not be available on all webservers):
1344     .. code-block:: none
1346         'all' -> 0.0.0.0/0
1347         'localhost' -> 127.0.0.1/8
1348         'localnetA' -> SERVER_ADDRESS/8
1349         'localnetB' -> SERVER_ADDRESS/16
1350         'localnetC' -> SERVER_ADDRESS/24
1352     Having an empty rule list is equivalent to either using ``'allow %
1353     from all'`` if your rule order is set to ``'deny,allow'`` or ``'deny %
1354     from all'`` if your rule order is set to ``'allow,deny'`` or
1355     ``'explicit'``.
1357     For the :term:`IP address` matching
1358     system, the following work:
1360     * ``xxx.xxx.xxx.xxx`` (an exact :term:`IP address`)
1361     * ``xxx.xxx.xxx.[yyy-zzz]`` (an :term:`IP address` range)
1362     * ``xxx.xxx.xxx.xxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IP` addresses)
1364     But the following does not work:
1366     * ``xxx.xxx.xxx.xx[yyy-zzz]`` (partial :term:`IP` address range)
1368     For :term:`IPv6` addresses, the following work:
1370     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`` (an exact :term:`IPv6` address)
1371     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]`` (an :term:`IPv6` address range)
1372     * ``xxxx:xxxx:xxxx:xxxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IPv6` addresses)
1374     But the following does not work:
1376     * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]`` (partial :term:`IPv6` address range)
1378     Examples:
1380     .. code-block:: none
1382         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1383         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow bob from all');
1384         // Allow only 'bob' to connect from any host
1386         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1387         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow mary from 192.168.100.[50-100]');
1388         // Allow only 'mary' to connect from host 192.168.100.50 through 192.168.100.100
1390         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1391         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow % from 192.168.[5-6].10');
1392         // Allow any user to connect from host 192.168.5.10 or 192.168.6.10
1394         $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
1395         $cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow root from 192.168.5.50','allow % from 192.168.6.10');
1396         // Allow any user to connect from 192.168.6.10, and additionally allow root to connect from 192.168.5.50
1398 .. config:option:: $cfg['Servers'][$i]['DisableIS']
1400     :type: boolean
1401     :default: false
1403     Disable using ``INFORMATION_SCHEMA`` to retrieve information (use
1404     ``SHOW`` commands instead), because of speed issues when many
1405     databases are present.
1407     .. note::
1409         Enabling this option might give you a big performance boost on older
1410         MySQL servers.
1412 .. config:option:: $cfg['Servers'][$i]['SignonScript']
1414     :type: string
1415     :default: ``''``
1417     .. versionadded:: 3.5.0
1419     Name of PHP script to be sourced and executed to obtain login
1420     credentials. This is alternative approach to session based single
1421     signon. The script has to provide a function called
1422     ``get_login_credentials`` which returns list of username and
1423     password, accepting single parameter of existing username (can be
1424     empty). See :file:`examples/signon-script.php` for an example:
1426     .. literalinclude:: ../examples/signon-script.php
1427         :language: php
1429     .. seealso:: :ref:`auth_signon`
1431 .. config:option:: $cfg['Servers'][$i]['SignonSession']
1433     :type: string
1434     :default: ``''``
1436     Name of session which will be used for signon authentication method.
1437     You should use something different than ``phpMyAdmin``, because this
1438     is session which phpMyAdmin uses internally. Takes effect only if
1439     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
1441     .. seealso:: :ref:`auth_signon`
1443 .. config:option:: $cfg['Servers'][$i]['SignonCookieParams']
1445     :type: array
1446     :default: ``array()``
1448     .. versionadded:: 4.7.0
1450     An associative array of session cookie parameters of other authentication system.
1451     It is not needed if the other system doesn't use session_set_cookie_params().
1452     Keys should include 'lifetime', 'path', 'domain', 'secure' or 'httponly'.
1453     Valid values are mentioned in `session_get_cookie_params <https://www.php.net/manual/en/
1454     function.session-get-cookie-params.php>`_, they should be set to same values as the
1455     other application uses. Takes effect only if
1456     :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
1458     .. seealso:: :ref:`auth_signon`
1460 .. config:option:: $cfg['Servers'][$i]['SignonURL']
1462     :type: string
1463     :default: ``''``
1465     :term:`URL` where user will be redirected
1466     to log in for signon authentication method. Should be absolute
1467     including protocol.
1469     .. seealso:: :ref:`auth_signon`
1471 .. config:option:: $cfg['Servers'][$i]['LogoutURL']
1473     :type: string
1474     :default: ``''``
1476     :term:`URL` where user will be redirected
1477     after logout (doesn't affect config authentication method). Should be
1478     absolute including protocol.
1480 Generic settings
1481 ----------------
1483 .. config:option:: $cfg['DisableShortcutKeys']
1485     :type: boolean
1486     :default: false
1488     You can disable phpMyAdmin shortcut keys by setting :config:option:`$cfg['DisableShortcutKeys']` to false.
1490 .. config:option:: $cfg['ServerDefault']
1492     :type: integer
1493     :default: 1
1495     If you have more than one server configured, you can set
1496     :config:option:`$cfg['ServerDefault']` to any one of them to autoconnect to that
1497     server when phpMyAdmin is started, or set it to 0 to be given a list
1498     of servers without logging in.
1500     If you have only one server configured,
1501     :config:option:`$cfg['ServerDefault']` MUST be set to that server.
1503 .. config:option:: $cfg['VersionCheck']
1505     :type: boolean
1506     :default: true
1508     Enables check for latest versions using JavaScript on the main phpMyAdmin
1509     page or by directly accessing :file:`version_check.php`.
1511     .. note::
1513         This setting can be adjusted by your vendor.
1515 .. config:option:: $cfg['ProxyUrl']
1517     :type: string
1518     :default: ""
1520     The url of the proxy to be used when phpmyadmin needs to access the outside
1521     internet such as when retrieving the latest version info or submitting error
1522     reports.  You need this if the server where phpMyAdmin is installed does not
1523     have direct access to the internet.
1524     The format is: "hostname:portnumber"
1526 .. config:option:: $cfg['ProxyUser']
1528     :type: string
1529     :default: ""
1531     The username for authenticating with the proxy. By default, no
1532     authentication is performed. If a username is supplied, Basic
1533     Authentication will be performed. No other types of authentication
1534     are currently supported.
1536 .. config:option:: $cfg['ProxyPass']
1538     :type: string
1539     :default: ""
1541     The password for authenticating with the proxy.
1543 .. config:option:: $cfg['MaxDbList']
1545     :type: integer
1546     :default: 100
1548     The maximum number of database names to be displayed in the main panel's
1549     database list.
1551 .. config:option:: $cfg['MaxTableList']
1553     :type: integer
1554     :default: 250
1556     The maximum number of table names to be displayed in the main panel's
1557     list (except on the Export page).
1559 .. config:option:: $cfg['ShowHint']
1561     :type: boolean
1562     :default: true
1564     Whether or not to show hints (for example, hints when hovering over
1565     table headers).
1567 .. config:option:: $cfg['MaxCharactersInDisplayedSQL']
1569     :type: integer
1570     :default: 1000
1572     The maximum number of characters when a :term:`SQL` query is displayed. The
1573     default limit of 1000 should be correct to avoid the display of tons of
1574     hexadecimal codes that represent BLOBs, but some users have real
1575     :term:`SQL` queries that are longer than 1000 characters. Also, if a
1576     query's length exceeds this limit, this query is not saved in the history.
1578 .. config:option:: $cfg['PersistentConnections']
1580     :type: boolean
1581     :default: false
1583     Whether `persistent connections <https://www.php.net/manual/en/features
1584     .persistent-connections.php>`_ should be used or not. Works with
1585     following extensions:
1587     * mysql (`mysql\_pconnect <https://www.php.net/manual/en/function.mysql-
1588       pconnect.php>`_),
1589     * mysqli (requires PHP 5.3.0 or newer, `more information
1590       <https://www.php.net/manual/en/mysqli.persistconns.php>`_).
1592 .. config:option:: $cfg['ForceSSL']
1594     :type: boolean
1595     :default: false
1597     .. deprecated:: 4.6.0
1599         This setting is no longer available since phpMyAdmin 4.6.0. Please
1600         adjust your webserver instead.
1602     Whether to force using https while accessing phpMyAdmin. In a reverse
1603     proxy setup, setting this to ``true`` is not supported.
1605     .. note::
1607         In some setups (like separate SSL proxy or load balancer) you might
1608         have to set :config:option:`$cfg['PmaAbsoluteUri']` for correct
1609         redirection.
1611 .. config:option:: $cfg['ExecTimeLimit']
1613     :type: integer [number of seconds]
1614     :default: 300
1616     Set the number of seconds a script is allowed to run. If seconds is
1617     set to zero, no time limit is imposed. This setting is used while
1618     importing/exporting dump files but has
1619     no effect when PHP is running in safe mode.
1621 .. config:option:: $cfg['SessionSavePath']
1623     :type: string
1624     :default: ``''``
1626     Path for storing session data (`session\_save\_path PHP parameter
1627     <https://www.php.net/session_save_path>`_).
1629     .. warning::
1631         This folder should not be publicly accessible through the webserver,
1632         otherwise you risk leaking private data from your session.
1634 .. config:option:: $cfg['MemoryLimit']
1636     :type: string [number of bytes]
1637     :default: ``'-1'``
1639     Set the number of bytes a script is allowed to allocate. If set to
1640     ``'-1'``, no limit is imposed. If set to ``'0'``, no change of the
1641     memory limit is attempted and the :file:`php.ini` ``memory_limit`` is
1642     used.
1644     This setting is used while importing/exporting dump files
1645     so you definitely don't want to put here a too low
1646     value. It has no effect when PHP is running in safe mode.
1648     You can also use any string as in :file:`php.ini`, eg. '16M'. Ensure you
1649     don't omit the suffix (16 means 16 bytes!)
1651 .. config:option:: $cfg['SkipLockedTables']
1653     :type: boolean
1654     :default: false
1656     Mark used tables and make it possible to show databases with locked
1657     tables (since MySQL 3.23.30).
1659 .. config:option:: $cfg['ShowSQL']
1661     :type: boolean
1662     :default: true
1664     Defines whether :term:`SQL` queries
1665     generated by phpMyAdmin should be displayed or not.
1667 .. config:option:: $cfg['RetainQueryBox']
1669     :type: boolean
1670     :default: false
1672     Defines whether the :term:`SQL` query box
1673     should be kept displayed after its submission.
1675 .. config:option:: $cfg['CodemirrorEnable']
1677     :type: boolean
1678     :default: true
1680     Defines whether to use a Javascript code editor for SQL query boxes.
1681     CodeMirror provides syntax highlighting and line numbers.  However,
1682     middle-clicking for pasting the clipboard contents in some Linux
1683     distributions (such as Ubuntu) is not supported by all browsers.
1685 .. config:option:: $cfg['DefaultForeignKeyChecks']
1687     :type: string
1688     :default: ``'default'``
1690     Default value of the checkbox for foreign key checks, to disable/enable
1691     foreign key checks for certain queries. The possible values are ``'default'``,
1692     ``'enable'`` or ``'disable'``. If set to ``'default'``, the value of the
1693     MySQL variable ``FOREIGN_KEY_CHECKS`` is used.
1695 .. config:option:: $cfg['AllowUserDropDatabase']
1697     :type: boolean
1698     :default: false
1700     .. warning::
1702         This is not a security measure as there will be always ways to
1703         circumvent this. If you want to prohibit users from dropping databases,
1704         revoke their corresponding DROP privilege.
1706     Defines whether normal users (non-administrator) are allowed to delete
1707     their own database or not. If set as false, the link :guilabel:`Drop
1708     Database` will not be shown, and even a ``DROP DATABASE mydatabase`` will
1709     be rejected. Quite practical for :term:`ISP` 's with many customers.
1711     This limitation of :term:`SQL` queries is not as strict as when using MySQL
1712     privileges. This is due to nature of :term:`SQL` queries which might be
1713     quite complicated.  So this choice should be viewed as help to avoid
1714     accidental dropping rather than strict privilege limitation.
1716 .. config:option:: $cfg['Confirm']
1718     :type: boolean
1719     :default: true
1721     Whether a warning ("Are your really sure...") should be displayed when
1722     you're about to lose data.
1724 .. config:option:: $cfg['UseDbSearch']
1726     :type: boolean
1727     :default: true
1729     Define whether the "search string inside database" is enabled or not.
1731 .. config:option:: $cfg['IgnoreMultiSubmitErrors']
1733     :type: boolean
1734     :default: false
1736     Define whether phpMyAdmin will continue executing a multi-query
1737     statement if one of the queries fails. Default is to abort execution.
1739 Cookie authentication options
1740 -----------------------------
1742 .. config:option:: $cfg['blowfish_secret']
1744     :type: string
1745     :default: ``''``
1747     The "cookie" auth\_type uses AES algorithm to encrypt the password. If you
1748     are using the "cookie" auth\_type, enter here a random passphrase of your
1749     choice. It will be used internally by the AES algorithm: you won’t be
1750     prompted for this passphrase.
1752     The secret should be 32 characters long. Using shorter will lead to weaker security
1753     of encrypted cookies, using longer will cause no harm.
1755     .. note::
1757         The configuration is called blowfish_secret for historical reasons as
1758         Blowfish algorithm was originally used to do the encryption.
1760     .. versionchanged:: 3.1.0
1761         Since version 3.1.0 phpMyAdmin can generate this on the fly, but it
1762         makes a bit weaker security as this generated secret is stored in
1763         session and furthermore it makes impossible to recall user name from
1764         cookie.
1766 .. config:option:: $cfg['LoginCookieRecall']
1768     :type: boolean
1769     :default: true
1771     Define whether the previous login should be recalled or not in cookie
1772     authentication mode.
1774     This is automatically disabled if you do not have
1775     configured :config:option:`$cfg['blowfish_secret']`.
1777 .. config:option:: $cfg['LoginCookieValidity']
1779     :type: integer [number of seconds]
1780     :default: 1440
1782     Define how long a login cookie is valid. Please note that php
1783     configuration option `session.gc\_maxlifetime
1784     <https://www.php.net/manual/en/session.configuration.php#ini.session.gc-
1785     maxlifetime>`_ might limit session validity and if the session is lost,
1786     the login cookie is also invalidated. So it is a good idea to set
1787     ``session.gc_maxlifetime`` at least to the same value of
1788     :config:option:`$cfg['LoginCookieValidity']`.
1790 .. config:option:: $cfg['LoginCookieStore']
1792     :type: integer [number of seconds]
1793     :default: 0
1795     Define how long login cookie should be stored in browser. Default 0
1796     means that it will be kept for existing session. This is recommended
1797     for not trusted environments.
1799 .. config:option:: $cfg['LoginCookieDeleteAll']
1801     :type: boolean
1802     :default: true
1804     If enabled (default), logout deletes cookies for all servers,
1805     otherwise only for current one. Setting this to false makes it easy to
1806     forget to log out from other server, when you are using more of them.
1808 .. _AllowArbitraryServer:
1809 .. config:option:: $cfg['AllowArbitraryServer']
1811     :type: boolean
1812     :default: false
1814     If enabled, allows you to log in to arbitrary servers using cookie
1815     authentication.
1817     .. note::
1819         Please use this carefully, as this may allow users access to MySQL servers
1820         behind the firewall where your :term:`HTTP` server is placed.
1821         See also :config:option:`$cfg['ArbitraryServerRegexp']`.
1823 .. config:option:: $cfg['ArbitraryServerRegexp']
1825     :type: string
1826     :default: ``''``
1828     Restricts the MySQL servers to which the user can log in when
1829     :config:option:`$cfg['AllowArbitraryServer']` is enabled by
1830     matching the :term:`IP` or the hostname of the MySQL server
1831     to the given regular expression. The regular expression must be enclosed
1832     with a delimiter character.
1834     It is recommended to include start and end symbols in the regullar
1835     expression, so that you can avoid partial matches on the string.
1837     **Examples:**
1839     .. code-block:: php
1841         // Allow connection to three listed servers:
1842         $cfg['ArbitraryServerRegexp'] = '/^(server|another|yetdifferent)$/';
1844         // Allow connection to range of IP addresses:
1845         $cfg['ArbitraryServerRegexp'] = '@^192\.168\.0\.[0-9]{1,}$@';
1847         // Allow connection to server name ending with -mysql:
1848         $cfg['ArbitraryServerRegexp'] = '@^[^:]\-mysql$@';
1850     .. note::
1852         The whole server name is matched, it can include port as well. Due to
1853         way MySQL is permissive in connection parameters, it is possible to use
1854         connection strings as ```server:3306-mysql```. This can be used to
1855         bypass regullar expression by the suffix, while connecting to another
1856         server.
1858 .. config:option:: $cfg['CaptchaLoginPublicKey']
1860     :type: string
1861     :default: ``''``
1863     The public key for the reCaptcha service that can be obtained from
1864     https://www.google.com/recaptcha/intro/v3.html.
1866     reCaptcha will be then used in :ref:`cookie`.
1868 .. config:option:: $cfg['CaptchaLoginPrivateKey']
1870     :type: string
1871     :default: ``''``
1873     The private key for the reCaptcha service that can be obtain from
1874     https://www.google.com/recaptcha/intro/v3.html.
1876     reCaptcha will be then used in :ref:`cookie`.
1878 Navigation panel setup
1879 ----------------------
1881 .. config:option:: $cfg['ShowDatabasesNavigationAsTree']
1883     :type: boolean
1884     :default: true
1886     In the navigation panel, replaces the database tree with a selector
1888 .. config:option:: $cfg['FirstLevelNavigationItems']
1890     :type: integer
1891     :default: 100
1893     The number of first level databases that can be displayed on each page
1894     of navigation tree.
1896 .. config:option:: $cfg['MaxNavigationItems']
1898     :type: integer
1899     :default: 50
1901     The number of items (tables, columns, indexes) that can be displayed on each
1902     page of the navigation tree.
1904 .. config:option:: $cfg['NavigationTreeEnableGrouping']
1906     :type: boolean
1907     :default: true
1909     Defines whether to group the databases based on a common prefix
1910     in their name :config:option:`$cfg['NavigationTreeDbSeparator']`.
1912 .. config:option:: $cfg['NavigationTreeDbSeparator']
1914     :type: string
1915     :default: ``'_'``
1917     The string used to separate the parts of the database name when
1918     showing them in a tree.
1920 .. config:option:: $cfg['NavigationTreeTableSeparator']
1922     :type: string or array
1923     :default: ``'__'``
1925     Defines a string to be used to nest table spaces. This means if you have
1926     tables like ``first__second__third`` this will be shown as a three-level
1927     hierarchy like: first > second > third.  If set to false or empty, the
1928     feature is disabled. NOTE: You should not use this separator at the
1929     beginning or end of a table name or multiple times after another without
1930     any other characters in between.
1932 .. config:option:: $cfg['NavigationTreeTableLevel']
1934     :type: integer
1935     :default: 1
1937     Defines how many sublevels should be displayed when splitting up
1938     tables by the above separator.
1940 .. config:option:: $cfg['NumRecentTables']
1942     :type: integer
1943     :default: 10
1945     The maximum number of recently used tables shown in the navigation
1946     panel. Set this to 0 (zero) to disable the listing of recent tables.
1948 .. config:option:: $cfg['NumFavoriteTables']
1950     :type: integer
1951     :default: 10
1953     The maximum number of favorite tables shown in the navigation
1954     panel. Set this to 0 (zero) to disable the listing of favorite tables.
1956 .. config:option:: $cfg['ZeroConf']
1958     :type: boolean
1959     :default: true
1961     Enables Zero Configuration mode in which the user will be offered a choice to
1962     create phpMyAdmin configuration storage in the current database
1963     or use the existing one, if already present.
1965     This setting has no effect if the phpMyAdmin configuration storage database
1966     is properly created and the related configuration directives (such as
1967     :config:option:`$cfg['Servers'][$i]['pmadb']` and so on) are configured.
1969 .. config:option:: $cfg['NavigationLinkWithMainPanel']
1971     :type: boolean
1972     :default: true
1974     Defines whether or not to link with main panel by highlighting
1975     the current database or table.
1977 .. config:option:: $cfg['NavigationDisplayLogo']
1979     :type: boolean
1980     :default: true
1982     Defines whether or not to display the phpMyAdmin logo at the top of
1983     the navigation panel.
1985 .. config:option:: $cfg['NavigationLogoLink']
1987     :type: string
1988     :default: ``'index.php'``
1990     Enter :term:`URL` where logo in the navigation panel will point to.
1991     For use especially with self made theme which changes this.
1992     For relative/internal URLs, you need to have leading `` ./ `` or trailing characters `` ? `` such as ``'./sql.php?'``.
1993     For external URLs, you should include URL protocol schemes (``http`` or ``https``) with absolute URLs.
1995 .. config:option:: $cfg['NavigationLogoLinkWindow']
1997     :type: string
1998     :default: ``'main'``
2000     Whether to open the linked page in the main window (``main``) or in a
2001     new one (``new``). Note: use ``new`` if you are linking to
2002     ``phpmyadmin.net``.
2004 .. config:option:: $cfg['NavigationTreeDisplayItemFilterMinimum']
2006     :type: integer
2007     :default: 30
2009     Defines the minimum number of items (tables, views, routines and
2010     events) to display a JavaScript filter box above the list of items in
2011     the navigation tree.
2013     To disable the filter completely some high number can be used (e.g. 9999)
2015 .. config:option:: $cfg['NavigationTreeDisplayDbFilterMinimum']
2017     :type: integer
2018     :default: 30
2020     Defines the minimum number of databases to display a JavaScript filter
2021     box above the list of databases in the navigation tree.
2023     To disable the filter completely some high number can be used
2024     (e.g. 9999)
2026 .. config:option:: $cfg['NavigationDisplayServers']
2028     :type: boolean
2029     :default: true
2031     Defines whether or not to display a server choice at the top of the
2032     navigation panel.
2034 .. config:option:: $cfg['DisplayServersList']
2036     :type: boolean
2037     :default: false
2039     Defines whether to display this server choice as links instead of in a
2040     drop-down.
2042 .. config:option:: $cfg['NavigationTreeDefaultTabTable']
2044     :type: string
2045     :default: ``'structure'``
2047     Defines the tab displayed by default when clicking the small icon next
2048     to each table name in the navigation panel. The possible values are the
2049     localized equivalent of:
2051     * ``structure``
2052     * ``sql``
2053     * ``search``
2054     * ``insert``
2055     * ``browse``
2057 .. config:option:: $cfg['NavigationTreeDefaultTabTable2']
2059     :type: string
2060     :default: null
2062     Defines the tab displayed by default when clicking the second small icon next
2063     to each table name in the navigation panel. The possible values are the
2064     localized equivalent of:
2066     * ``(empty)``
2067     * ``structure``
2068     * ``sql``
2069     * ``search``
2070     * ``insert``
2071     * ``browse``
2073 .. config:option:: $cfg['NavigationTreeEnableExpansion']
2075     :type: boolean
2076     :default: true
2078     Whether to offer the possibility of tree expansion in the navigation panel.
2080 .. config:option:: $cfg['NavigationTreeShowTables']
2082     :type: boolean
2083     :default: true
2085     Whether to show tables under database in the navigation panel.
2087 .. config:option:: $cfg['NavigationTreeShowViews']
2089     :type: boolean
2090     :default: true
2092     Whether to show views under database in the navigation panel.
2094 .. config:option:: $cfg['NavigationTreeShowFunctions']
2096     :type: boolean
2097     :default: true
2099     Whether to show functions under database in the navigation panel.
2101 .. config:option:: $cfg['NavigationTreeShowProcedures']
2103     :type: boolean
2104     :default: true
2106     Whether to show procedures under database in the navigation panel.
2108 .. config:option:: $cfg['NavigationTreeShowEvents']
2110     :type: boolean
2111     :default: true
2113     Whether to show events under database in the navigation panel.
2115 .. config:option:: $cfg['NavigationWidth']
2117     :type: integer
2118     :default: 240
2120     Navigation panel width, set to 0 to collapse it by default.
2122 Main panel
2123 ----------
2125 .. config:option:: $cfg['ShowStats']
2127     :type: boolean
2128     :default: true
2130     Defines whether or not to display space usage and statistics about
2131     databases and tables. Note that statistics requires at least MySQL
2132     3.23.3 and that, at this date, MySQL doesn't return such information
2133     for Berkeley DB tables.
2135 .. config:option:: $cfg['ShowServerInfo']
2137     :type: boolean
2138     :default: true
2140     Defines whether to display detailed server information on main page.
2141     You can additionally hide more information by using
2142     :config:option:`$cfg['Servers'][$i]['verbose']`.
2144 .. config:option:: $cfg['ShowPhpInfo']
2146     :type: boolean
2147     :default: false
2149     Defines whether to display the :guilabel:`PHP information` or not at
2150     the starting main (right) frame.
2152     Please note that to block the usage of ``phpinfo()`` in scripts, you have to
2153     put this in your :file:`php.ini`:
2155     .. code-block:: ini
2157         disable_functions = phpinfo()
2159     .. warning::
2161         Enabling phpinfo page will leak quite a lot of information about server
2162         setup. Is it not recommended to enable this on shared installations.
2164         This might also make easier some remote attacks on your installations,
2165         so enable this only when needed.
2167 .. config:option:: $cfg['ShowChgPassword']
2169     :type: boolean
2170     :default: true
2172     Defines whether to display the :guilabel:`Change password` link or not at
2173     the starting main (right) frame. This setting does not check MySQL commands
2174     entered directly.
2176     Please note that enabling the :guilabel:`Change password` link has no effect
2177     with config authentication mode: because of the hard coded password value
2178     in the configuration file, end users can't be allowed to change their
2179     passwords.
2181 .. config:option:: $cfg['ShowCreateDb']
2183     :type: boolean
2184     :default: true
2186     Defines whether to display the form for creating database or not at the
2187     starting main (right) frame. This setting does not check MySQL commands
2188     entered directly.
2190 .. config:option:: $cfg['ShowGitRevision']
2192     :type: boolean
2193     :default: true
2195     Defines whether to display informations about the current Git revision (if
2196     applicable) on the main panel.
2198 .. config:option:: $cfg['MysqlMinVersion']
2200     :type: array
2202     Defines the minimum supported MySQL version. The default is chosen
2203     by the phpMyAdmin team; however this directive was asked by a developer
2204     of the Plesk control panel to ease integration with older MySQL servers
2205     (where most of the phpMyAdmin features work).
2207 Database structure
2208 ------------------
2210 .. config:option:: $cfg['ShowDbStructureCreation']
2212     :type: boolean
2213     :default: false
2215     Defines whether the database structure page (tables list) has a
2216     "Creation" column that displays when each table was created.
2218 .. config:option:: $cfg['ShowDbStructureLastUpdate']
2220     :type: boolean
2221     :default: false
2223     Defines whether the database structure page (tables list) has a "Last
2224     update" column that displays when each table was last updated.
2226 .. config:option:: $cfg['ShowDbStructureLastCheck']
2228     :type: boolean
2229     :default: false
2231     Defines whether the database structure page (tables list) has a "Last
2232     check" column that displays when each table was last checked.
2234 .. config:option:: $cfg['HideStructureActions']
2236     :type: boolean
2237     :default: true
2239     Defines whether the table structure actions are hidden under a "More"
2240     drop-down.
2242 .. config:option:: $cfg['ShowColumnComments']
2244     :type: boolean
2245     :default: true
2247     Defines whether to show column comments as a column in the table structure view.
2249 Browse mode
2250 -----------
2252 .. config:option:: $cfg['TableNavigationLinksMode']
2254     :type: string
2255     :default: ``'icons'``
2257     Defines whether the table navigation links contain ``'icons'``, ``'text'``
2258     or ``'both'``.
2260 .. config:option:: $cfg['ActionLinksMode']
2262     :type: string
2263     :default: ``'both'``
2265     If set to ``icons``, will display icons instead of text for db and table
2266     properties links (like :guilabel:`Browse`, :guilabel:`Select`,
2267     :guilabel:`Insert`, ...). Can be set to ``'both'``
2268     if you want icons AND text. When set to ``text``, will only show text.
2270 .. config:option:: $cfg['RowActionType']
2272     :type: string
2273     :default: ``'both'``
2275     Whether to display icons or text or both icons and text in table row action
2276     segment. Value can be either of ``'icons'``, ``'text'`` or ``'both'``.
2278 .. config:option:: $cfg['ShowAll']
2280     :type: boolean
2281     :default: false
2283     Defines whether a user should be displayed a "Show all" button in browse
2284     mode or not in all cases. By default it is shown only on small tables (less
2285     than 500 rows) to avoid performance issues while getting too many rows.
2287 .. config:option:: $cfg['MaxRows']
2289     :type: integer
2290     :default: 25
2292     Number of rows displayed when browsing a result set and no LIMIT
2293     clause is used. If the result set contains more rows, "Previous" and
2294     "Next" links will be shown. Possible values: 25,50,100,250,500.
2296 .. config:option:: $cfg['Order']
2298     :type: string
2299     :default: ``'SMART'``
2301     Defines whether columns are displayed in ascending (``ASC``) order, in
2302     descending (``DESC``) order or in a "smart" (``SMART``) order - I.E.
2303     descending order for columns of type TIME, DATE, DATETIME and
2304     TIMESTAMP, ascending order else- by default.
2306     .. versionchanged:: 3.4.0
2307         Since phpMyAdmin 3.4.0 the default value is ``'SMART'``.
2309 .. config:option:: $cfg['GridEditing']
2311     :type: string
2312     :default: ``'double-click'``
2314     Defines which action (``double-click`` or ``click``) triggers grid
2315     editing. Can be deactivated with the ``disabled`` value.
2317 .. config:option:: $cfg['RelationalDisplay']
2319     :type: string
2320     :default: ``'K'``
2322     Defines the initial behavior for Options > Relational. ``K``, which
2323     is the default, displays the key while ``D`` shows the display column.
2325 .. config:option:: $cfg['SaveCellsAtOnce']
2327     :type: boolean
2328     :default: false
2330     Defines whether or not to save all edited cells at once for grid
2331     editing.
2333 Editing mode
2334 ------------
2336 .. config:option:: $cfg['ProtectBinary']
2338     :type: boolean or string
2339     :default: ``'blob'``
2341     Defines whether ``BLOB`` or ``BINARY`` columns are protected from
2342     editing when browsing a table's content. Valid values are:
2344     * ``false`` to allow editing of all columns;
2345     * ``'blob'`` to allow editing of all columns except ``BLOBS``;
2346     * ``'noblob'`` to disallow editing of all columns except ``BLOBS`` (the
2347       opposite of ``'blob'``);
2348     * ``'all'`` to disallow editing of all ``BINARY`` or ``BLOB`` columns.
2350 .. config:option:: $cfg['ShowFunctionFields']
2352     :type: boolean
2353     :default: true
2355     Defines whether or not MySQL functions fields should be initially
2356     displayed in edit/insert mode. Since version 2.10, the user can toggle
2357     this setting from the interface.
2359 .. config:option:: $cfg['ShowFieldTypesInDataEditView']
2361     :type: boolean
2362     :default: true
2364     Defines whether or not type fields should be initially displayed in
2365     edit/insert mode. The user can toggle this setting from the interface.
2367 .. config:option:: $cfg['InsertRows']
2369     :type: integer
2370     :default: 2
2372     Defines the default number of rows to be entered from the Insert page.
2373     Users can manually change this from the bottom of that page to add or remove
2374     blank rows.
2376 .. config:option:: $cfg['ForeignKeyMaxLimit']
2378     :type: integer
2379     :default: 100
2381     If there are fewer items than this in the set of foreign keys, then a
2382     drop-down box of foreign keys is presented, in the style described by
2383     the :config:option:`$cfg['ForeignKeyDropdownOrder']` setting.
2385 .. config:option:: $cfg['ForeignKeyDropdownOrder']
2387     :type: array
2388     :default: array('content-id', 'id-content')
2390     For the foreign key drop-down fields, there are several methods of
2391     display, offering both the key and value data. The contents of the
2392     array should be one or both of the following strings: ``content-id``,
2393     ``id-content``.
2395 Export and import settings
2396 --------------------------
2398 .. config:option:: $cfg['ZipDump']
2400     :type: boolean
2401     :default: true
2403 .. config:option:: $cfg['GZipDump']
2405     :type: boolean
2406     :default: true
2408 .. config:option:: $cfg['BZipDump']
2410     :type: boolean
2411     :default: true
2413     Defines whether to allow the use of zip/GZip/BZip2 compression when
2414     creating a dump file
2416 .. config:option:: $cfg['CompressOnFly']
2418     :type: boolean
2419     :default: true
2421     Defines whether to allow on the fly compression for GZip/BZip2
2422     compressed exports. This doesn't affect smaller dumps and allows users
2423     to create larger dumps that won't otherwise fit in memory due to php
2424     memory limit. Produced files contain more GZip/BZip2 headers, but all
2425     normal programs handle this correctly.
2427 .. config:option:: $cfg['Export']
2429     :type: array
2430     :default: array(...)
2432     In this array are defined default parameters for export, names of
2433     items are similar to texts seen on export page, so you can easily
2434     identify what they mean.
2436 .. config:option:: $cfg['Export']['format']
2438     :type: string
2439     :default: ``'sql'``
2441     Default export format.
2443 .. config:option:: $cfg['Export']['method']
2445     :type: string
2446     :default: ``'quick'``
2448     Defines how the export form is displayed when it loads. Valid values
2449     are:
2451     * ``quick`` to display the minimum number of options to configure
2452     * ``custom`` to display every available option to configure
2453     * ``custom-no-form`` same as ``custom`` but does not display the option
2454       of using quick export
2456 .. config:option:: $cfg['Export']['charset']
2458     :type: string
2459     :default: ``''``
2461     Defines charset for generated export. By default no charset conversion is
2462     done assuming UTF-8.
2464 .. config:option:: $cfg['Export']['file_template_table']
2466     :type: string
2467     :default: ``'@TABLE@'``
2469     Default filename template for table exports.
2471     .. seealso:: :ref:`faq6_27`
2473 .. config:option:: $cfg['Export']['file_template_database']
2475     :type: string
2476     :default: ``'@DATABASE@'``
2478     Default filename template for database exports.
2480     .. seealso:: :ref:`faq6_27`
2482 .. config:option:: $cfg['Export']['file_template_server']
2484     :type: string
2485     :default: ``'@SERVER@'``
2487     Default filename template for server exports.
2489     .. seealso:: :ref:`faq6_27`
2491 .. config:option:: $cfg['Import']
2493     :type: array
2494     :default: array(...)
2496     In this array are defined default parameters for import, names of
2497     items are similar to texts seen on import page, so you can easily
2498     identify what they mean.
2500 .. config:option:: $cfg['Import']['charset']
2502     :type: string
2503     :default: ``''``
2505     Defines charset for import. By default no charset conversion is done
2506     assuming UTF-8.
2508 Tabs display settings
2509 ---------------------
2511 .. config:option:: $cfg['TabsMode']
2513     :type: string
2514     :default: ``'both'``
2516     Defines whether the menu tabs contain ``'icons'``, ``'text'`` or ``'both'``.
2518 .. config:option:: $cfg['PropertiesNumColumns']
2520     :type: integer
2521     :default: 1
2523     How many columns will be utilized to display the tables on the database
2524     property view? When setting this to a value larger than 1, the type of the
2525     database will be omitted for more display space.
2527 .. config:option:: $cfg['DefaultTabServer']
2529     :type: string
2530     :default: ``'welcome'``
2532     Defines the tab displayed by default on server view. The possible values
2533     are the localized equivalent of:
2535     * ``welcome`` (recommended for multi-user setups)
2536     * ``databases``,
2537     * ``status``
2538     * ``variables``
2539     * ``privileges``
2541 .. config:option:: $cfg['DefaultTabDatabase']
2543     :type: string
2544     :default: ``'structure'``
2546     Defines the tab displayed by default on database view. The possible values
2547     are the localized equivalent of:
2549     * ``structure``
2550     * ``sql``
2551     * ``search``
2552     * ``operations``
2554 .. config:option:: $cfg['DefaultTabTable']
2556     :type: string
2557     :default: ``'browse'``
2559     Defines the tab displayed by default on table view. The possible values
2560     are the localized equivalent of:
2562     * ``structure``
2563     * ``sql``
2564     * ``search``
2565     * ``insert``
2566     * ``browse``
2568 PDF Options
2569 -----------
2571 .. config:option:: $cfg['PDFPageSizes']
2573     :type: array
2574     :default: ``array('A3', 'A4', 'A5', 'letter', 'legal')``
2576     Array of possible paper sizes for creating PDF pages.
2578     You should never need to change this.
2580 .. config:option:: $cfg['PDFDefaultPageSize']
2582     :type: string
2583     :default: ``'A4'``
2585     Default page size to use when creating PDF pages. Valid values are any
2586     listed in :config:option:`$cfg['PDFPageSizes']`.
2588 Languages
2589 ---------
2591 .. config:option:: $cfg['DefaultLang']
2593     :type: string
2594     :default: ``'en'``
2596     Defines the default language to use, if not browser-defined or user-
2597     defined. The corresponding language file needs to be in
2598     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
2600 .. config:option:: $cfg['DefaultConnectionCollation']
2602     :type: string
2603     :default: ``'utf8mb4_general_ci'``
2605     Defines the default connection collation to use, if not user-defined.
2606     See the `MySQL documentation for charsets
2607     <https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>`_
2608     for list of possible values.
2610 .. config:option:: $cfg['Lang']
2612     :type: string
2613     :default: not set
2615     Force language to use. The corresponding language file needs to be in
2616     locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
2618 .. config:option:: $cfg['FilterLanguages']
2620     :type: string
2621     :default: ``''``
2623     Limit list of available languages to those matching the given regular
2624     expression. For example if you want only Czech and English, you should
2625     set filter to ``'^(cs|en)'``.
2627 .. config:option:: $cfg['RecodingEngine']
2629     :type: string
2630     :default: ``'auto'``
2632     You can select here which functions will be used for character set
2633     conversion. Possible values are:
2635     * auto - automatically use available one (first is tested iconv, then
2636       recode)
2637     * iconv - use iconv or libiconv functions
2638     * recode - use recode\_string function
2639     * mb - use :term:`mbstring` extension
2640     * none - disable encoding conversion
2642     Enabled charset conversion activates a pull-down menu in the Export
2643     and Import pages, to choose the character set when exporting a file.
2644     The default value in this menu comes from
2645     :config:option:`$cfg['Export']['charset']` and :config:option:`$cfg['Import']['charset']`.
2647 .. config:option:: $cfg['IconvExtraParams']
2649     :type: string
2650     :default: ``'//TRANSLIT'``
2652     Specify some parameters for iconv used in charset conversion. See
2653     `iconv documentation <https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentati
2654     on/libiconv-1.15/iconv_open.3.html>`_ for details. By default
2655     ``//TRANSLIT`` is used, so that invalid characters will be
2656     transliterated.
2658 .. config:option:: $cfg['AvailableCharsets']
2660     :type: array
2661     :default: array(...)
2663     Available character sets for MySQL conversion. You can add your own
2664     (any of supported by recode/iconv) or remove these which you don't
2665     use. Character sets will be shown in same order as here listed, so if
2666     you frequently use some of these move them to the top.
2668 Web server settings
2669 -------------------
2671 .. config:option:: $cfg['OBGzip']
2673     :type: string/boolean
2674     :default: ``'auto'``
2676     Defines whether to use GZip output buffering for increased speed in
2677     :term:`HTTP` transfers. Set to
2678     true/false for enabling/disabling. When set to 'auto' (string),
2679     phpMyAdmin tries to enable output buffering and will automatically
2680     disable it if your browser has some problems with buffering. IE6 with
2681     a certain patch is known to cause data corruption when having enabled
2682     buffering.
2684 .. config:option:: $cfg['TrustedProxies']
2686     :type: array
2687     :default: array()
2689     Lists proxies and HTTP headers which are trusted for
2690     :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`. This list is by
2691     default empty, you need to fill in some trusted proxy servers if you
2692     want to use rules for IP addresses behind proxy.
2694     The following example specifies that phpMyAdmin should trust a
2695     HTTP\_X\_FORWARDED\_FOR (``X-Forwarded-For``) header coming from the proxy
2696     1.2.3.4:
2698     .. code-block:: php
2700         $cfg['TrustedProxies'] = array('1.2.3.4' => 'HTTP_X_FORWARDED_FOR');
2702     The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
2703     client's IP address as usual.
2705 .. config:option:: $cfg['GD2Available']
2707     :type: string
2708     :default: ``'auto'``
2710     Specifies whether GD >= 2 is available. If yes it can be used for MIME
2711     transformations. Possible values are:
2713     * auto - automatically detect
2714     * yes - GD 2 functions can be used
2715     * no - GD 2 function cannot be used
2717 .. config:option:: $cfg['CheckConfigurationPermissions']
2719     :type: boolean
2720     :default: true
2722     We normally check the permissions on the configuration file to ensure
2723     it's not world writable. However, phpMyAdmin could be installed on a
2724     NTFS filesystem mounted on a non-Windows server, in which case the
2725     permissions seems wrong but in fact cannot be detected. In this case a
2726     sysadmin would set this parameter to ``false``.
2728 .. config:option:: $cfg['LinkLengthLimit']
2730     :type: integer
2731     :default: 1000
2733     Limit for length of :term:`URL` in links.  When length would be above this
2734     limit, it is replaced by form with button. This is required as some web
2735     servers (:term:`IIS`) have problems with long :term:`URL` .
2737 .. config:option:: $cfg['CSPAllow']
2739     :type: string
2740     :default: ``''``
2742     Additional string to include in allowed script and image sources in Content
2743     Security Policy header.
2745     This can be useful when you want to include some external JavaScript files
2746     in :file:`config.footer.inc.php` or :file:`config.header.inc.php`, which
2747     would be normally not allowed by Content Security Policy.
2749     To allow some sites, just list them within the string:
2751     .. code-block:: php
2753         $cfg['CSPAllow'] = 'example.com example.net';
2755     .. versionadded:: 4.0.4
2757 .. config:option:: $cfg['DisableMultiTableMaintenance']
2759     :type: boolean
2760     :default: false
2762     In the database Structure page, it's possible to mark some tables then
2763     choose an operation like optimizing for many tables. This can slow
2764     down a server; therefore, setting this to ``true`` prevents this kind
2765     of multiple maintenance operation.
2767 Theme settings
2768 --------------
2770     Please directly modify :file:`themes/themename/layout.inc.php`, although
2771     your changes will be overwritten with the next update.
2773 Design customization
2774 --------------------
2776 .. config:option:: $cfg['NavigationTreePointerEnable']
2778     :type: boolean
2779     :default: true
2781     When set to true, hovering over an item in the navigation panel causes that item to be marked
2782     (the background is highlighted).
2784 .. config:option:: $cfg['BrowsePointerEnable']
2786     :type: boolean
2787     :default: true
2789     When set to true, hovering over a row in the Browse page causes that row to be marked (the background
2790     is highlighted).
2792 .. config:option:: $cfg['BrowseMarkerEnable']
2794     :type: boolean
2795     :default: true
2797     When set to true, a data row is marked (the background is highlighted) when the row is selected
2798     with the checkbox.
2800 .. config:option:: $cfg['LimitChars']
2802     :type: integer
2803     :default: 50
2805     Maximum number of characters shown in any non-numeric field on browse
2806     view. Can be turned off by a toggle button on the browse page.
2808 .. config:option:: $cfg['RowActionLinks']
2810     :type: string
2811     :default: ``'left'``
2813     Defines the place where table row links (Edit, Copy, Delete) would be
2814     put when tables contents are displayed (you may have them displayed at
2815     the left side, right side, both sides or nowhere).
2817 .. config:option:: $cfg['RowActionLinksWithoutUnique']
2819     :type: boolean
2820     :default: false
2822     Defines whether to show row links (Edit, Copy, Delete) and checkboxes
2823     for multiple row operations even when the selection does not have a :term:`unique key`.
2824     Using row actions in the absence of a unique key may result in different/more
2825     rows being affected since there is no guaranteed way to select the exact row(s).
2827 .. config:option:: $cfg['RememberSorting']
2829     :type: boolean
2830     :default: true
2832     If enabled, remember the sorting of each table when browsing them.
2834 .. config:option:: $cfg['TablePrimaryKeyOrder']
2836     :type: string
2837     :default: ``'NONE'``
2839     This defines the default sort order for the tables, having a :term:`primary key`,
2840     when there is no sort order defines externally.
2841     Acceptable values : ['NONE', 'ASC', 'DESC']
2843 .. config:option:: $cfg['ShowBrowseComments']
2845     :type: boolean
2846     :default: true
2848 .. config:option:: $cfg['ShowPropertyComments']
2850     :type: boolean
2851     :default: true
2853     By setting the corresponding variable to ``true`` you can enable the
2854     display of column comments in Browse or Property display. In browse
2855     mode, the comments are shown inside the header. In property mode,
2856     comments are displayed using a CSS-formatted dashed-line below the
2857     name of the column. The comment is shown as a tool-tip for that
2858     column.
2860 Text fields
2861 -----------
2863 .. config:option:: $cfg['CharEditing']
2865     :type: string
2866     :default: ``'input'``
2868     Defines which type of editing controls should be used for CHAR and
2869     VARCHAR columns. Applies to data editing and also to the default values
2870     in structure editing. Possible values are:
2872     * input - this allows to limit size of text to size of columns in MySQL,
2873       but has problems with newlines in columns
2874     * textarea - no problems with newlines in columns, but also no length
2875       limitations
2877 .. config:option:: $cfg['MinSizeForInputField']
2879     :type: integer
2880     :default: 4
2882     Defines the minimum size for input fields generated for CHAR and
2883     VARCHAR columns.
2885 .. config:option:: $cfg['MaxSizeForInputField']
2887     :type: integer
2888     :default: 60
2890     Defines the maximum size for input fields generated for CHAR and
2891     VARCHAR columns.
2893 .. config:option:: $cfg['TextareaCols']
2895     :type: integer
2896     :default: 40
2898 .. config:option:: $cfg['TextareaRows']
2900     :type: integer
2901     :default: 15
2903 .. config:option:: $cfg['CharTextareaCols']
2905     :type: integer
2906     :default: 40
2908 .. config:option:: $cfg['CharTextareaRows']
2910     :type: integer
2911     :default: 2
2913     Number of columns and rows for the textareas. This value will be
2914     emphasized (\*2) for :term:`SQL` query
2915     textareas and (\*1.25) for :term:`SQL`
2916     textareas inside the query window.
2918     The Char\* values are used for CHAR
2919     and VARCHAR editing (if configured via :config:option:`$cfg['CharEditing']`).
2921 .. config:option:: $cfg['LongtextDoubleTextarea']
2923     :type: boolean
2924     :default: true
2926     Defines whether textarea for LONGTEXT columns should have double size.
2928 .. config:option:: $cfg['TextareaAutoSelect']
2930     :type: boolean
2931     :default: false
2933     Defines if the whole textarea of the query box will be selected on
2934     click.
2936 .. config:option:: $cfg['EnableAutocompleteForTablesAndColumns']
2938     :type: boolean
2939     :default: true
2941     Whether to enable autocomplete for table and column names in any
2942     SQL query box.
2944 SQL query box settings
2945 ----------------------
2947 .. config:option:: $cfg['SQLQuery']['Edit']
2949     :type: boolean
2950     :default: true
2952     Whether to display an edit link to change a query in any SQL Query
2953     box.
2955 .. config:option:: $cfg['SQLQuery']['Explain']
2957     :type: boolean
2958     :default: true
2960     Whether to display a link to explain a SELECT query in any SQL Query
2961     box.
2963 .. config:option:: $cfg['SQLQuery']['ShowAsPHP']
2965     :type: boolean
2966     :default: true
2968     Whether to display a link to wrap a query in PHP code in any SQL Query
2969     box.
2971 .. config:option:: $cfg['SQLQuery']['Refresh']
2973     :type: boolean
2974     :default: true
2976     Whether to display a link to refresh a query in any SQL Query box.
2978 .. _web-dirs:
2980 Web server upload/save/import directories
2981 -----------------------------------------
2983 If PHP is running in safe mode, all directories must be owned by the same user
2984 as the owner of the phpMyAdmin scripts.
2986 If the directory where phpMyAdmin is installed is subject to an
2987 ``open_basedir`` restriction, you need to create a temporary directory in some
2988 directory accessible by the PHP interpreter.
2990 For security reasons, all directories should be outside the tree published by
2991 webserver. If you cannot avoid having this directory published by webserver,
2992 limit access to it either by web server configuration (for example using
2993 .htaccess or web.config files) or place at least an empty :file:`index.html`
2994 file there, so that directory listing is not possible. However as long as the
2995 directory is accessible by web server, an attacker can guess filenames to download
2996 the files.
2998 .. config:option:: $cfg['UploadDir']
3000     :type: string
3001     :default: ``''``
3003     The name of the directory where :term:`SQL` files have been uploaded by
3004     other means than phpMyAdmin (for example, ftp). Those files are available
3005     under a drop-down box when you click the database or table name, then the
3006     Import tab.
3008     If
3009     you want different directory for each user, %u will be replaced with
3010     username.
3012     Please note that the file names must have the suffix ".sql"
3013     (or ".sql.bz2" or ".sql.gz" if support for compressed formats is
3014     enabled).
3016     This feature is useful when your file is too big to be
3017     uploaded via :term:`HTTP`, or when file
3018     uploads are disabled in PHP.
3020     .. warning::
3022         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3023         to setup this directory and how to make its usage secure.
3025     .. seealso::
3027         See :ref:`faq1_16` for alternatives.
3029 .. config:option:: $cfg['SaveDir']
3031     :type: string
3032     :default: ``''``
3034     The name of the webserver directory where exported files can be saved.
3036     If you want a different directory for each user, %u will be replaced with the
3037     username.
3039     Please note that the directory must exist and has to be writable for
3040     the user running webserver.
3042     .. warning::
3044         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3045         to setup this directory and how to make its usage secure.
3047 .. config:option:: $cfg['TempDir']
3049     :type: string
3050     :default: ``'./tmp/'``
3052     The name of the directory where temporary files can be stored. It is used
3053     for several purposes, currently:
3055     * The templates cache which speeds up page loading.
3056     * ESRI Shapefiles import, see :ref:`faq6_30`.
3057     * To work around limitations of ``open_basedir`` for uploaded files, see
3058       :ref:`faq1_11`.
3060     This directory should have as strict permissions as possible as the only
3061     user required to access this directory is the one who runs the webserver.
3062     If you have root privileges, simply make this user owner of this directory
3063     and make it accessible only by it:
3065     .. code-block:: sh
3067         chown www-data:www-data tmp
3068         chmod 700 tmp
3070     If you cannot change owner of the directory, you can achieve a similar
3071     setup using :term:`ACL`:
3073     .. code-block:: sh
3075         chmod 700 tmp
3076         setfacl -m "g:www-data:rwx" tmp
3077         setfacl -d -m "g:www-data:rwx" tmp
3079     If neither of above works for you, you can still make the directory
3080     :command:`chmod 777`, but it might impose risk of other users on system
3081     reading and writing data in this directory.
3083     .. warning::
3085         Please see top of this chapter (:ref:`web-dirs`) for instructions how
3086         to setup this directory and how to make its usage secure.
3088 Various display setting
3089 -----------------------
3091 .. config:option:: $cfg['RepeatCells']
3093     :type: integer
3094     :default: 100
3096     Repeat the headers every X cells, or 0 to deactivate.
3098 .. config:option:: $cfg['QueryHistoryDB']
3100     :type: boolean
3101     :default: false
3103 .. config:option:: $cfg['QueryHistoryMax']
3105     :type: integer
3106     :default: 25
3108     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true``, all your
3109     Queries are logged to a table, which has to be created by you (see
3110     :config:option:`$cfg['Servers'][$i]['history']`). If set to false, all your
3111     queries will be appended to the form, but only as long as your window is
3112     opened they remain saved.
3114     When using the JavaScript based query window, it will always get updated
3115     when you click on a new table/db to browse and will focus if you click on
3116     :guilabel:`Edit SQL` after using a query. You can suppress updating the
3117     query window by checking the box :guilabel:`Do not overwrite this query
3118     from outside the window` below the query textarea. Then you can browse
3119     tables/databases in the background without losing the contents of the
3120     textarea, so this is especially useful when composing a query with tables
3121     you first have to look in. The checkbox will get automatically checked
3122     whenever you change the contents of the textarea. Please uncheck the button
3123     whenever you definitely want the query window to get updated even though
3124     you have made alterations.
3126     If :config:option:`$cfg['QueryHistoryDB']` is set to ``true`` you can
3127     specify the amount of saved history items using
3128     :config:option:`$cfg['QueryHistoryMax']`.
3130 .. config:option:: $cfg['BrowseMIME']
3132     :type: boolean
3133     :default: true
3135     Enable :ref:`transformations`.
3137 .. config:option:: $cfg['MaxExactCount']
3139     :type: integer
3140     :default: 50000
3142     For InnoDB tables, determines for how large tables phpMyAdmin should
3143     get the exact row count using ``SELECT COUNT``. If the approximate row
3144     count as returned by ``SHOW TABLE STATUS`` is smaller than this value,
3145     ``SELECT COUNT`` will be used, otherwise the approximate count will be
3146     used.
3148     .. versionchanged:: 4.8.0
3150         The default value was lowered to 50000 for performance reasons.
3152     .. versionchanged:: 4.2.6
3154         The default value was changed to 500000.
3156     .. seealso:: :ref:`faq3_11`
3158 .. config:option:: $cfg['MaxExactCountViews']
3160     :type: integer
3161     :default: 0
3163     For VIEWs, since obtaining the exact count could have an impact on
3164     performance, this value is the maximum to be displayed, using a
3165     ``SELECT COUNT ... LIMIT``. Setting this to 0 bypasses any row
3166     counting.
3168 .. config:option:: $cfg['NaturalOrder']
3170     :type: boolean
3171     :default: true
3173     Sorts database and table names according to natural order (for
3174     example, t1, t2, t10). Currently implemented in the navigation panel
3175     and in Database view, for the table list.
3177 .. config:option:: $cfg['InitialSlidersState']
3179     :type: string
3180     :default: ``'closed'``
3182     If set to ``'closed'``, the visual sliders are initially in a closed
3183     state. A value of ``'open'`` does the reverse. To completely disable
3184     all visual sliders, use ``'disabled'``.
3186 .. config:option:: $cfg['UserprefsDisallow']
3188     :type: array
3189     :default: array()
3191     Contains names of configuration options (keys in ``$cfg`` array) that
3192     users can't set through user preferences. For possible values, refer
3193     to clases under :file:`libraries/classes/Config/Forms/User/`.
3195 .. config:option:: $cfg['UserprefsDeveloperTab']
3197     :type: boolean
3198     :default: false
3200     Activates in the user preferences a tab containing options for
3201     developers of phpMyAdmin.
3203 Page titles
3204 -----------
3206 .. config:option:: $cfg['TitleTable']
3208     :type: string
3209     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'``
3211 .. config:option:: $cfg['TitleDatabase']
3213     :type: string
3214     :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'``
3216 .. config:option:: $cfg['TitleServer']
3218     :type: string
3219     :default: ``'@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'``
3221 .. config:option:: $cfg['TitleDefault']
3223     :type: string
3224     :default: ``'@HTTP_HOST@ | @PHPMYADMIN@'``
3226     Allows you to specify window's title bar. You can use :ref:`faq6_27`.
3228 Theme manager settings
3229 ----------------------
3231 .. config:option:: $cfg['ThemeManager']
3233     :type: boolean
3234     :default: true
3236     Enables user-selectable themes. See :ref:`faqthemes`.
3238 .. config:option:: $cfg['ThemeDefault']
3240     :type: string
3241     :default: ``'pmahomme'``
3243     The default theme (a subdirectory under :file:`./themes/`).
3245 .. config:option:: $cfg['ThemePerServer']
3247     :type: boolean
3248     :default: false
3250     Whether to allow different theme for each server.
3252 .. config:option:: $cfg['FontSize']
3254     :type: string
3255     :default: '82%'
3257     Font size to use, is applied in CSS.
3259 Default queries
3260 ---------------
3262 .. config:option:: $cfg['DefaultQueryTable']
3264     :type: string
3265     :default: ``'SELECT * FROM @TABLE@ WHERE 1'``
3267 .. config:option:: $cfg['DefaultQueryDatabase']
3269     :type: string
3270     :default: ``''``
3272     Default queries that will be displayed in query boxes when user didn't
3273     specify any. You can use standard :ref:`faq6_27`.
3275 MySQL settings
3276 --------------
3278 .. config:option:: $cfg['DefaultFunctions']
3280     :type: array
3281     :default: array(...)
3283     Functions selected by default when inserting/changing row, Functions
3284     are defined for meta types as (FUNC\_NUMBER, FUNC\_DATE, FUNC\_CHAR,
3285     FUNC\_SPATIAL, FUNC\_UUID) and for ``first_timestamp``, which is used
3286     for first timestamp column in table.
3288 Default options for Transformations
3289 -----------------------------------
3291 .. config:option:: $cfg['DefaultTransformations']
3293     :type: array
3294     :default: An array with below listed key-values
3296 .. config:option:: $cfg['DefaultTransformations']['Substring']
3298     :type: array
3299     :default: array(0, 'all', '…')
3301 .. config:option:: $cfg['DefaultTransformations']['Bool2Text']
3303     :type: array
3304     :default: array('T', 'F')
3306 .. config:option:: $cfg['DefaultTransformations']['External']
3308     :type: array
3309     :default: array(0, '-f /dev/null -i -wrap -q', 1, 1)
3311 .. config:option:: $cfg['DefaultTransformations']['PreApPend']
3313     :type: array
3314     :default: array('', '')
3316 .. config:option:: $cfg['DefaultTransformations']['Hex']
3318     :type: array
3319     :default: array('2')
3321 .. config:option:: $cfg['DefaultTransformations']['DateFormat']
3323     :type: array
3324     :default: array(0, '', 'local')
3326 .. config:option:: $cfg['DefaultTransformations']['Inline']
3328     :type: array
3329     :default: array('100', 100)
3331 .. config:option:: $cfg['DefaultTransformations']['TextImageLink']
3333     :type: array
3334     :default: array('', 100, 50)
3336 .. config:option:: $cfg['DefaultTransformations']['TextLink']
3338     :type: array
3339     :default: array('', '', '')
3341 Console settings
3342 ----------------
3344 .. note::
3346     These settings are mostly meant to be changed by user.
3348 .. config:option:: $cfg['Console']['StartHistory']
3350     :type: boolean
3351     :default: false
3353     Show query history at start
3355 .. config:option:: $cfg['Console']['AlwaysExpand']
3357     :type: boolean
3358     :default: false
3360     Always expand query messages
3362 .. config:option:: $cfg['Console']['CurrentQuery']
3364     :type: boolean
3365     :default: true
3367     Show current browsing query
3369 .. config:option:: $cfg['Console']['EnterExecutes']
3371     :type: boolean
3372     :default: false
3374     Execute queries on Enter and insert new line with Shift + Enter
3376 .. config:option:: $cfg['Console']['DarkTheme']
3378     :type: boolean
3379     :default: false
3381     Switch to dark theme
3383 .. config:option:: $cfg['Console']['Mode']
3385     :type: string
3386     :default: 'info'
3388     Console mode
3390 .. config:option:: $cfg['Console']['Height']
3392     :type: integer
3393     :default: 92
3395     Console height
3397 Developer
3398 ---------
3400 .. warning::
3402     These settings might have huge effect on performance or security.
3404 .. config:option:: $cfg['DBG']
3406     :type: array
3407     :default: array(...)
3409 .. config:option:: $cfg['DBG']['sql']
3411     :type: boolean
3412     :default: false
3414     Enable logging queries and execution times to be
3415     displayed in the console's Debug SQL tab.
3417 .. config:option:: $cfg['DBG']['sqllog']
3419     :type: boolean
3420     :default: false
3422     Enable logging of queries and execution times to the syslog.
3423     Requires :config:option:`$cfg['DBG']['sql']` to be enabled.
3425 .. config:option:: $cfg['DBG']['demo']
3427     :type: boolean
3428     :default: false
3430     Enable to let server present itself as demo server.
3431     This is used for `phpMyAdmin demo server <https://www.phpmyadmin.net/try/>`_.
3433     It currently changes following behavior:
3435     * There is welcome message on the main page.
3436     * There is footer information about demo server and used git revision.
3437     * The setup script is enabled even with existing configuration.
3438     * The setup does not try to connect to the MySQL server.
3440 .. config:option:: $cfg['DBG']['simple2fa']
3442     :type: boolean
3443     :default: false
3445     Can be used for testing two-factor authentication using :ref:`simple2fa`.
3447 .. _config-examples:
3449 Examples
3450 --------
3452 See following configuration snippets for typical setups of phpMyAdmin.
3454 Basic example
3455 +++++++++++++
3457 Example configuration file, which can be copied to :file:`config.inc.php` to
3458 get some core configuration layout; it is distributed with phpMyAdmin as
3459 :file:`config.sample.inc.php`. Please note that it does not contain all
3460 configuration options, only the most frequently used ones.
3462 .. literalinclude:: ../config.sample.inc.php
3463    :language: php
3465 .. warning::
3467     Don't use the controluser 'pma' if it does not yet exist and don't use 'pmapass'
3468     as password.
3470 .. _example-signon:
3472 Example for signon authentication
3473 +++++++++++++++++++++++++++++++++
3475 This example uses :file:`examples/signon.php` to demonstrate usage of :ref:`auth_signon`:
3477 .. code-block:: php
3479     <?php
3480     $i = 0;
3481     $i++;
3482     $cfg['Servers'][$i]['extension']     = 'mysqli';
3483     $cfg['Servers'][$i]['auth_type']     = 'signon';
3484     $cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
3485     $cfg['Servers'][$i]['SignonURL']     = 'examples/signon.php';
3486     ?>`
3488 Example for IP address limited autologin
3489 ++++++++++++++++++++++++++++++++++++++++
3491 If you want to automatically login when accessing phpMyAdmin locally while asking
3492 for a password when accessing remotely, you can achieve it using following snippet:
3494 .. code-block:: php
3496     if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
3497         $cfg['Servers'][$i]['auth_type'] = 'config';
3498         $cfg['Servers'][$i]['user'] = 'root';
3499         $cfg['Servers'][$i]['password'] = 'yourpassword';
3500     } else {
3501         $cfg['Servers'][$i]['auth_type'] = 'cookie';
3502     }
3504 .. note::
3506     Filtering based on IP addresses isn't reliable over the internet, use it
3507     only for local address.
3509 Example for using multiple MySQL servers
3510 ++++++++++++++++++++++++++++++++++++++++
3512 You can configure any number of servers using :config:option:`$cfg['Servers']`,
3513 following example shows two of them:
3515 .. code-block:: php
3517     <?php
3518     $cfg['blowfish_secret']='multiServerExample70518';
3519     //any string of your choice
3520     $i = 0;
3522     $i++; // server 1 :
3523     $cfg['Servers'][$i]['auth_type'] = 'cookie';
3524     $cfg['Servers'][$i]['verbose']   = 'no1';
3525     $cfg['Servers'][$i]['host']      = 'localhost';
3526     $cfg['Servers'][$i]['extension'] = 'mysqli';
3527     // more options for #1 ...
3529     $i++; // server 2 :
3530     $cfg['Servers'][$i]['auth_type'] = 'cookie';
3531     $cfg['Servers'][$i]['verbose']   = 'no2';
3532     $cfg['Servers'][$i]['host']      = 'remote.host.addr';//or ip:'10.9.8.1'
3533     // this server must allow remote clients, e.g., host 10.9.8.%
3534     // not only in mysql.host but also in the startup configuration
3535     $cfg['Servers'][$i]['extension'] = 'mysqli';
3536     // more options for #2 ...
3538     // end of server sections
3539     $cfg['ServerDefault'] = 0; // to choose the server on startup
3541     // further general options ...
3542     ?>
3544 .. _example-google-ssl:
3546 Google Cloud SQL with SSL
3547 +++++++++++++++++++++++++
3549 To connect to Google Could SQL, you currently need to disable certificate
3550 verification. This is caused by the certficate being issued for CN matching
3551 your instance name, but you connect to an IP address and PHP tries to match
3552 these two. With verfication you end up with error message like:
3554 .. code-block:: text
3556     Peer certificate CN=`api-project-851612429544:pmatest' did not match expected CN=`8.8.8.8'
3558 .. warning::
3560     With disabled verification your traffic is encrypted, but you're open to
3561     man in the middle attacks.
3563 To connect phpMyAdmin to Google Cloud SQL using SSL download the client and
3564 server certificates and tell phpMyAdmin to use them:
3566 .. code-block:: php
3568     // IP address of your instance
3569     $cfg['Servers'][$i]['host'] = '8.8.8.8';
3570     // Use SSL for connection
3571     $cfg['Servers'][$i]['ssl'] = true;
3572     // Client secret key
3573     $cfg['Servers'][$i]['ssl_key'] = '../client-key.pem';
3574     // Client certificate
3575     $cfg['Servers'][$i]['ssl_cert'] = '../client-cert.pem';
3576     // Server certification authority
3577     $cfg['Servers'][$i]['ssl_ca'] = '../server-ca.pem';
3578     // Disable SSL verification (see above note)
3579     $cfg['Servers'][$i]['ssl_verify'] = false;
3581 .. seealso::
3583     :ref:`ssl`,
3584     :config:option:`$cfg['Servers'][$i]['ssl']`,
3585     :config:option:`$cfg['Servers'][$i]['ssl_key']`,
3586     :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
3587     :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
3588     :config:option:`$cfg['Servers'][$i]['ssl_verify']`,
3589     <https://bugs.php.net/bug.php?id=72048>