PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/doc/config.rst

http://github.com/phpmyadmin/phpmyadmin
ReStructuredText | 3782 lines | 2536 code | 1246 blank | 0 comment | 0 complexity | 8dff8512fa1fe7ac79e1feafdd974cac MD5 | raw file
Possible License(s): GPL-2.0, MIT, LGPL-3.0
  1. .. index:: config.inc.php
  2. .. _config:
  3. Configuration
  4. =============
  5. All configurable data is placed in :file:`config.inc.php` in phpMyAdmin's
  6. toplevel directory. If this file does not exist, please refer to the
  7. :ref:`setup` section to create one. This file only needs to contain the
  8. parameters you want to change from their corresponding default value in
  9. :file:`libraries/config.default.php` (this file is not intended for changes).
  10. .. seealso::
  11. :ref:`config-examples` for examples of configurations
  12. If a directive is missing from your file, you can just add another line with
  13. the file. This file is for over-writing the defaults; if you wish to use the
  14. default value there's no need to add a line here.
  15. The parameters which relate to design (like colors) are placed in
  16. :file:`themes/themename/scss/_variables.scss`. You might also want to create
  17. :file:`config.footer.inc.php` and :file:`config.header.inc.php` files to add
  18. your site specific code to be included on start and end of each page.
  19. .. note::
  20. Some distributions (eg. Debian or Ubuntu) store :file:`config.inc.php` in
  21. ``/etc/phpmyadmin`` instead of within phpMyAdmin sources.
  22. Basic settings
  23. --------------
  24. .. config:option:: $cfg['PmaAbsoluteUri']
  25. :type: string
  26. :default: ``''``
  27. .. versionchanged:: 4.6.5
  28. This setting was not available in phpMyAdmin 4.6.0 - 4.6.4.
  29. Sets here the complete :term:`URL` (with full path) to your phpMyAdmin
  30. installation's directory. E.g.
  31. ``https://www.example.net/path_to_your_phpMyAdmin_directory/``. Note also
  32. that the :term:`URL` on most of web servers are case sensitive (even on
  33. Windows). Dont forget the trailing slash at the end.
  34. Starting with version 2.3.0, it is advisable to try leaving this blank. In
  35. most cases phpMyAdmin automatically detects the proper setting. Users of
  36. port forwarding or complex reverse proxy setup might need to set this.
  37. A good test is to browse a table, edit a row and save it. There should be
  38. an error message if phpMyAdmin is having trouble autodetecting the correct
  39. value. If you get an error that this must be set or if the autodetect code
  40. fails to detect your path, please post a bug report on our bug tracker so
  41. we can improve the code.
  42. .. seealso:: :ref:`faq1_40`, :ref:`faq2_5`, :ref:`faq4_7`, :ref:`faq5_16`
  43. .. config:option:: $cfg['PmaNoRelation_DisableWarning']
  44. :type: boolean
  45. :default: false
  46. Starting with version 2.3.0 phpMyAdmin offers a lot of features to
  47. work with master / foreign tables (see :config:option:`$cfg['Servers'][$i]['pmadb']`).
  48. If you tried to set this
  49. up and it does not work for you, have a look on the :guilabel:`Structure` page
  50. of one database where you would like to use it. You will find a link
  51. that will analyze why those features have been disabled.
  52. If you do not want to use those features set this variable to ``true`` to
  53. stop this message from appearing.
  54. .. config:option:: $cfg['AuthLog']
  55. :type: string
  56. :default: ``'auto'``
  57. .. versionadded:: 4.8.0
  58. This is supported since phpMyAdmin 4.8.0.
  59. Configure authentication logging destination. Failed (or all, depending on
  60. :config:option:`$cfg['AuthLogSuccess']`) authentication attempts will be
  61. logged according to this directive:
  62. ``auto``
  63. Let phpMyAdmin automatically choose between ``syslog`` and ``php``.
  64. ``syslog``
  65. Log using syslog, using AUTH facility, on most systems this ends up
  66. in :file:`/var/log/auth.log`.
  67. ``php``
  68. Log into PHP error log.
  69. ``sapi``
  70. Log into PHP SAPI logging.
  71. ``/path/to/file``
  72. Any other value is treated as a filename and log entries are written there.
  73. .. note::
  74. When logging to a file, make sure its permissions are correctly set
  75. for a web server user, the setup should closely match instructions
  76. described in :config:option:`$cfg['TempDir']`:
  77. .. config:option:: $cfg['AuthLogSuccess']
  78. :type: boolean
  79. :default: false
  80. .. versionadded:: 4.8.0
  81. This is supported since phpMyAdmin 4.8.0.
  82. Whether to log successful authentication attempts into
  83. :config:option:`$cfg['AuthLog']`.
  84. .. config:option:: $cfg['SuhosinDisableWarning']
  85. :type: boolean
  86. :default: false
  87. A warning is displayed on the main page if Suhosin is detected.
  88. You can set this parameter to ``true`` to stop this message from appearing.
  89. .. config:option:: $cfg['LoginCookieValidityDisableWarning']
  90. :type: boolean
  91. :default: false
  92. A warning is displayed on the main page if the PHP parameter
  93. session.gc_maxlifetime is lower than cookie validity configured in phpMyAdmin.
  94. You can set this parameter to ``true`` to stop this message from appearing.
  95. .. config:option:: $cfg['ServerLibraryDifference_DisableWarning']
  96. :type: boolean
  97. :default: false
  98. .. deprecated:: 4.7.0
  99. This setting was removed as the warning has been removed as well.
  100. A warning is displayed on the main page if there is a difference
  101. between the MySQL library and server version.
  102. You can set this parameter to ``true`` to stop this message from appearing.
  103. .. config:option:: $cfg['ReservedWordDisableWarning']
  104. :type: boolean
  105. :default: false
  106. This warning is displayed on the Structure page of a table if one or more
  107. column names match with words which are MySQL reserved.
  108. If you want to turn off this warning, you can set it to ``true`` and
  109. warning will no longer be displayed.
  110. .. config:option:: $cfg['TranslationWarningThreshold']
  111. :type: integer
  112. :default: 80
  113. Show warning about incomplete translations on certain threshold.
  114. .. config:option:: $cfg['SendErrorReports']
  115. :type: string
  116. :default: ``'ask'``
  117. Sets the default behavior for JavaScript error reporting.
  118. Whenever an error is detected in the JavaScript execution, an error report
  119. may be sent to the phpMyAdmin team if the user agrees.
  120. The default setting of ``'ask'`` will ask the user everytime there is a new
  121. error report. However you can set this parameter to ``'always'`` to send error
  122. reports without asking for confirmation or you can set it to ``'never'`` to
  123. never send error reports.
  124. This directive is available both in the configuration file and in users
  125. preferences. If the person in charge of a multi-user installation prefers
  126. to disable this feature for all users, a value of ``'never'`` should be
  127. set, and the :config:option:`$cfg['UserprefsDisallow']` directive should
  128. contain ``'SendErrorReports'`` in one of its array values.
  129. .. config:option:: $cfg['ConsoleEnterExecutes']
  130. :type: boolean
  131. :default: false
  132. Setting this to ``true`` allows the user to execute queries by pressing Enter
  133. instead of Ctrl+Enter. A new line can be inserted by pressing Shift+Enter.
  134. The behaviour of the console can be temporarily changed using console's
  135. settings interface.
  136. .. config:option:: $cfg['AllowThirdPartyFraming']
  137. :type: boolean|string
  138. :default: false
  139. Setting this to ``true`` allows phpMyAdmin to be included inside a frame,
  140. and is a potential security hole allowing cross-frame scripting attacks or
  141. clickjacking. Setting this to 'sameorigin' prevents phpMyAdmin to be
  142. included from another document in a frame, unless that document belongs
  143. to the same domain.
  144. Server connection settings
  145. --------------------------
  146. .. config:option:: $cfg['Servers']
  147. :type: array
  148. :default: one server array with settings listed below
  149. Since version 1.4.2, phpMyAdmin supports the administration of multiple
  150. MySQL servers. Therefore, a :config:option:`$cfg['Servers']`-array has been
  151. added which contains the login information for the different servers. The
  152. first :config:option:`$cfg['Servers'][$i]['host']` contains the hostname of
  153. the first server, the second :config:option:`$cfg['Servers'][$i]['host']`
  154. the hostname of the second server, etc. In
  155. :file:`libraries/config.default.php`, there is only one section for server
  156. definition, however you can put as many as you need in
  157. :file:`config.inc.php`, copy that block or needed parts (you don't have to
  158. define all settings, just those you need to change).
  159. .. note::
  160. The :config:option:`$cfg['Servers']` array starts with
  161. $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. If you want more
  162. than one server, just copy following section (including $i
  163. increment) several times. There is no need to define full server
  164. array, just define values you need to change.
  165. .. config:option:: $cfg['Servers'][$i]['host']
  166. :type: string
  167. :default: ``'localhost'``
  168. The hostname or :term:`IP` address of your $i-th MySQL-server. E.g.
  169. ``localhost``.
  170. Possible values are:
  171. * hostname, e.g., ``'localhost'`` or ``'mydb.example.org'``
  172. * IP address, e.g., ``'127.0.0.1'`` or ``'192.168.10.1'``
  173. * IPv6 address, e.g. ``2001:cdba:0000:0000:0000:0000:3257:9652``
  174. * dot - ``'.'``, i.e., use named pipes on windows systems
  175. * empty - ``''``, disables this server
  176. .. note::
  177. The hostname ``localhost`` is handled specially by MySQL and it uses
  178. the socket based connection protocol. To use TCP/IP networking, use an
  179. IP address or hostname such as ``127.0.0.1`` or ``db.example.com``. You
  180. can configure the path to the socket with
  181. :config:option:`$cfg['Servers'][$i]['socket']`.
  182. .. seealso::
  183. :config:option:`$cfg['Servers'][$i]['port']`,
  184. <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
  185. .. config:option:: $cfg['Servers'][$i]['port']
  186. :type: string
  187. :default: ``''``
  188. The port-number of your $i-th MySQL-server. Default is 3306 (leave
  189. blank).
  190. .. note::
  191. If you use ``localhost`` as the hostname, MySQL ignores this port number
  192. and connects with the socket, so if you want to connect to a port
  193. different from the default port, use ``127.0.0.1`` or the real hostname
  194. in :config:option:`$cfg['Servers'][$i]['host']`.
  195. .. seealso::
  196. :config:option:`$cfg['Servers'][$i]['host']`,
  197. <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
  198. .. config:option:: $cfg['Servers'][$i]['socket']
  199. :type: string
  200. :default: ``''``
  201. The path to the socket to use. Leave blank for default. To determine
  202. the correct socket, check your MySQL configuration or, using the
  203. :command:`mysql` commandline client, issue the ``status`` command. Among the
  204. resulting information displayed will be the socket used.
  205. .. note::
  206. This takes effect only if :config:option:`$cfg['Servers'][$i]['host']` is set
  207. to ``localhost``.
  208. .. seealso::
  209. :config:option:`$cfg['Servers'][$i]['host']`,
  210. <https://dev.mysql.com/doc/refman/5.7/en/connecting.html>
  211. .. config:option:: $cfg['Servers'][$i]['ssl']
  212. :type: boolean
  213. :default: false
  214. Whether to enable SSL for the connection between phpMyAdmin and the MySQL
  215. server to secure the connection.
  216. When using the ``'mysql'`` extension,
  217. none of the remaining ``'ssl...'`` configuration options apply.
  218. We strongly recommend the ``'mysqli'`` extension when using this option.
  219. .. seealso::
  220. :ref:`ssl`,
  221. :ref:`example-google-ssl`,
  222. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  223. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  224. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  225. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  226. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  227. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  228. .. config:option:: $cfg['Servers'][$i]['ssl_key']
  229. :type: string
  230. :default: NULL
  231. Path to the client key file when using SSL for connecting to the MySQL
  232. server. This is used to authenticate the client to the server.
  233. For example:
  234. .. code-block:: php
  235. $cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/server-key.pem';
  236. .. seealso::
  237. :ref:`ssl`,
  238. :ref:`example-google-ssl`,
  239. :config:option:`$cfg['Servers'][$i]['ssl']`,
  240. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  241. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  242. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  243. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  244. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  245. .. config:option:: $cfg['Servers'][$i]['ssl_cert']
  246. :type: string
  247. :default: NULL
  248. Path to the client certificate file when using SSL for connecting to the
  249. MySQL server. This is used to authenticate the client to the server.
  250. .. seealso::
  251. :ref:`ssl`,
  252. :ref:`example-google-ssl`,
  253. :config:option:`$cfg['Servers'][$i]['ssl']`,
  254. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  255. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  256. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  257. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  258. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  259. .. config:option:: $cfg['Servers'][$i]['ssl_ca']
  260. :type: string
  261. :default: NULL
  262. Path to the CA file when using SSL for connecting to the MySQL server.
  263. .. seealso::
  264. :ref:`ssl`,
  265. :ref:`example-google-ssl`,
  266. :config:option:`$cfg['Servers'][$i]['ssl']`,
  267. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  268. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  269. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  270. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  271. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  272. .. config:option:: $cfg['Servers'][$i]['ssl_ca_path']
  273. :type: string
  274. :default: NULL
  275. Directory containing trusted SSL CA certificates in PEM format.
  276. .. seealso::
  277. :ref:`ssl`,
  278. :ref:`example-google-ssl`,
  279. :config:option:`$cfg['Servers'][$i]['ssl']`,
  280. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  281. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  282. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  283. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  284. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  285. .. config:option:: $cfg['Servers'][$i]['ssl_ciphers']
  286. :type: string
  287. :default: NULL
  288. List of allowable ciphers for SSL connections to the MySQL server.
  289. .. seealso::
  290. :ref:`ssl`,
  291. :ref:`example-google-ssl`,
  292. :config:option:`$cfg['Servers'][$i]['ssl']`,
  293. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  294. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  295. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  296. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  297. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  298. .. config:option:: $cfg['Servers'][$i]['ssl_verify']
  299. :type: boolean
  300. :default: true
  301. .. versionadded:: 4.6.0
  302. This is supported since phpMyAdmin 4.6.0.
  303. If your PHP install uses the MySQL Native Driver (mysqlnd), your
  304. MySQL server is 5.6 or later, and your SSL certificate is self-signed,
  305. there is a chance your SSL connection will fail due to validation.
  306. Setting this to ``false`` will disable the validation check.
  307. Since PHP 5.6.0 it also verifies whether server name matches CN of its
  308. certificate. There is currently no way to disable just this check without
  309. disabling complete SSL verification.
  310. .. warning::
  311. Disabling the certificate verification defeats purpose of using SSL.
  312. This will make the connection vulnerable to man in the middle attacks.
  313. .. note::
  314. This flag only works with PHP 5.6.16 or later.
  315. .. seealso::
  316. :ref:`ssl`,
  317. :ref:`example-google-ssl`,
  318. :config:option:`$cfg['Servers'][$i]['ssl']`,
  319. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  320. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  321. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  322. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  323. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  324. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  325. .. config:option:: $cfg['Servers'][$i]['connect_type']
  326. :type: string
  327. :default: ``'tcp'``
  328. .. deprecated:: 4.7.0
  329. This setting is no longer used as of 4.7.0, since MySQL decides the
  330. connection type based on host, so it could lead to unexpected results.
  331. Please set :config:option:`$cfg['Servers'][$i]['host']` accordingly
  332. instead.
  333. What type connection to use with the MySQL server. Your options are
  334. ``'socket'`` and ``'tcp'``. It defaults to tcp as that is nearly guaranteed
  335. to be available on all MySQL servers, while sockets are not supported on
  336. some platforms. To use the socket mode, your MySQL server must be on the
  337. same machine as the Web server.
  338. .. config:option:: $cfg['Servers'][$i]['compress']
  339. :type: boolean
  340. :default: false
  341. Whether to use a compressed protocol for the MySQL server connection
  342. or not (experimental).
  343. .. _controlhost:
  344. .. config:option:: $cfg['Servers'][$i]['controlhost']
  345. :type: string
  346. :default: ``''``
  347. Permits to use an alternate host to hold the configuration storage
  348. data.
  349. .. seealso::
  350. :config:option:`$cfg['Servers'][$i]['control_*']`
  351. .. _controlport:
  352. .. config:option:: $cfg['Servers'][$i]['controlport']
  353. :type: string
  354. :default: ``''``
  355. Permits to use an alternate port to connect to the host that
  356. holds the configuration storage.
  357. .. seealso::
  358. :config:option:`$cfg['Servers'][$i]['control_*']`
  359. .. _controluser:
  360. .. config:option:: $cfg['Servers'][$i]['controluser']
  361. :type: string
  362. :default: ``''``
  363. .. config:option:: $cfg['Servers'][$i]['controlpass']
  364. :type: string
  365. :default: ``''``
  366. This special account is used to access :ref:`linked-tables`.
  367. You don't need it in single user case, but if phpMyAdmin is shared it
  368. is recommended to give access to :ref:`linked-tables` only to this user
  369. and configure phpMyAdmin to use it. All users will then be able to use
  370. the features without need to have direct access to :ref:`linked-tables`.
  371. .. versionchanged:: 2.2.5
  372. those were called ``stduser`` and ``stdpass``
  373. .. seealso::
  374. :ref:`setup`,
  375. :ref:`authentication_modes`,
  376. :ref:`linked-tables`,
  377. :config:option:`$cfg['Servers'][$i]['pmadb']`,
  378. :config:option:`$cfg['Servers'][$i]['controlhost']`,
  379. :config:option:`$cfg['Servers'][$i]['controlport']`,
  380. :config:option:`$cfg['Servers'][$i]['control_*']`
  381. .. config:option:: $cfg['Servers'][$i]['control_*']
  382. :type: mixed
  383. .. versionadded:: 4.7.0
  384. You can change any MySQL connection setting for control link (used to
  385. access :ref:`linked-tables`) using configuration prefixed with ``control_``.
  386. This can be used to change any aspect of the control connection, which by
  387. default uses same parameters as the user one.
  388. For example you can configure SSL for the control connection:
  389. .. code-block:: php
  390. // Enable SSL
  391. $cfg['Servers'][$i]['control_ssl'] = true;
  392. // Client secret key
  393. $cfg['Servers'][$i]['control_ssl_key'] = '../client-key.pem';
  394. // Client certificate
  395. $cfg['Servers'][$i]['control_ssl_cert'] = '../client-cert.pem';
  396. // Server certification authority
  397. $cfg['Servers'][$i]['control_ssl_ca'] = '../server-ca.pem';
  398. .. seealso::
  399. :config:option:`$cfg['Servers'][$i]['ssl']`,
  400. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  401. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  402. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  403. :config:option:`$cfg['Servers'][$i]['ssl_ca_path']`,
  404. :config:option:`$cfg['Servers'][$i]['ssl_ciphers']`,
  405. :config:option:`$cfg['Servers'][$i]['ssl_verify']`
  406. .. config:option:: $cfg['Servers'][$i]['auth_type']
  407. :type: string
  408. :default: ``'cookie'``
  409. Whether config or cookie or :term:`HTTP` or signon authentication should be
  410. used for this server.
  411. * 'config' authentication (``$auth_type = 'config'``) is the plain old
  412. way: username and password are stored in :file:`config.inc.php`.
  413. * 'cookie' authentication mode (``$auth_type = 'cookie'``) allows you to
  414. log in as any valid MySQL user with the help of cookies.
  415. * 'http' authentication allows you to log in as any
  416. valid MySQL user via HTTP-Auth.
  417. * 'signon' authentication mode (``$auth_type = 'signon'``) allows you to
  418. log in from prepared PHP session data or using supplied PHP script.
  419. .. seealso:: :ref:`authentication_modes`
  420. .. _servers_auth_http_realm:
  421. .. config:option:: $cfg['Servers'][$i]['auth_http_realm']
  422. :type: string
  423. :default: ``''``
  424. When using auth\_type = ``http``, this field allows to define a custom
  425. :term:`HTTP` Basic Auth Realm which will be displayed to the user. If not
  426. explicitly specified in your configuration, a string combined of
  427. "phpMyAdmin " and either :config:option:`$cfg['Servers'][$i]['verbose']` or
  428. :config:option:`$cfg['Servers'][$i]['host']` will be used.
  429. .. _servers_user:
  430. .. config:option:: $cfg['Servers'][$i]['user']
  431. :type: string
  432. :default: ``'root'``
  433. .. config:option:: $cfg['Servers'][$i]['password']
  434. :type: string
  435. :default: ``''``
  436. When using :config:option:`$cfg['Servers'][$i]['auth_type']` set to
  437. 'config', this is the user/password-pair which phpMyAdmin will use to
  438. connect to the MySQL server. This user/password pair is not needed when
  439. :term:`HTTP` or cookie authentication is used
  440. and should be empty.
  441. .. _servers_nopassword:
  442. .. config:option:: $cfg['Servers'][$i]['nopassword']
  443. :type: boolean
  444. :default: false
  445. .. deprecated:: 4.7.0
  446. This setting was removed as it can produce unexpected results.
  447. Allow attempt to log in without password when a login with password
  448. fails. This can be used together with http authentication, when
  449. authentication is done some other way and phpMyAdmin gets user name
  450. from auth and uses empty password for connecting to MySQL. Password
  451. login is still tried first, but as fallback, no password method is
  452. tried.
  453. .. _servers_only_db:
  454. .. config:option:: $cfg['Servers'][$i]['only_db']
  455. :type: string or array
  456. :default: ``''``
  457. If set to a (an array of) database name(s), only this (these)
  458. database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
  459. this/these database(s) name(s) may contain MySQL wildcards characters
  460. ("\_" and "%"): if you want to use literal instances of these
  461. characters, escape them (I.E. use ``'my\_db'`` and not ``'my_db'``).
  462. This setting is an efficient way to lower the server load since the
  463. latter does not need to send MySQL requests to build the available
  464. database list. But **it does not replace the privileges rules of the
  465. MySQL database server**. If set, it just means only these databases
  466. will be displayed but **not that all other databases can't be used.**
  467. An example of using more that one database:
  468. .. code-block:: php
  469. $cfg['Servers'][$i]['only_db'] = ['db1', 'db2'];
  470. .. versionchanged:: 4.0.0
  471. Previous versions permitted to specify the display order of
  472. the database names via this directive.
  473. .. config:option:: $cfg['Servers'][$i]['hide_db']
  474. :type: string
  475. :default: ``''``
  476. Regular expression for hiding some databases from unprivileged users.
  477. This only hides them from listing, but a user is still able to access
  478. them (using, for example, the SQL query area). To limit access, use
  479. the MySQL privilege system. For example, to hide all databases
  480. starting with the letter "a", use
  481. .. code-block:: php
  482. $cfg['Servers'][$i]['hide_db'] = '^a';
  483. and to hide both "db1" and "db2" use
  484. .. code-block:: php
  485. $cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';
  486. More information on regular expressions can be found in the `PCRE
  487. pattern syntax
  488. <https://www.php.net/manual/en/reference.pcre.pattern.syntax.php>`_ portion
  489. of the PHP reference manual.
  490. .. config:option:: $cfg['Servers'][$i]['verbose']
  491. :type: string
  492. :default: ``''``
  493. Only useful when using phpMyAdmin with multiple server entries. If
  494. set, this string will be displayed instead of the hostname in the
  495. pull-down menu on the main page. This can be useful if you want to
  496. show only certain databases on your system, for example. For HTTP
  497. auth, all non-US-ASCII characters will be stripped.
  498. .. config:option:: $cfg['Servers'][$i]['extension']
  499. :type: string
  500. :default: ``'mysqli'``
  501. .. deprecated:: 4.2.0
  502. This setting was removed. The ``mysql`` extension will only be used when
  503. the ``mysqli`` extension is not available. As of 5.0.0, only the
  504. ``mysqli`` extension can be used.
  505. The PHP MySQL extension to use (``mysql`` or ``mysqli``).
  506. It is recommended to use ``mysqli`` in all installations.
  507. .. config:option:: $cfg['Servers'][$i]['pmadb']
  508. :type: string
  509. :default: ``''``
  510. The name of the database containing the phpMyAdmin configuration
  511. storage.
  512. See the :ref:`linked-tables` section in this document to see the benefits of
  513. this feature, and for a quick way of creating this database and the needed
  514. tables.
  515. If you are the only user of this phpMyAdmin installation, you can use your
  516. current database to store those special tables; in this case, just put your
  517. current database name in :config:option:`$cfg['Servers'][$i]['pmadb']`. For a
  518. multi-user installation, set this parameter to the name of your central
  519. database containing the phpMyAdmin configuration storage.
  520. .. _bookmark:
  521. .. config:option:: $cfg['Servers'][$i]['bookmarktable']
  522. :type: string or false
  523. :default: ``''``
  524. Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
  525. can be useful for queries you often run. To allow the usage of this
  526. functionality:
  527. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  528. * enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
  529. This feature can be disabled by setting the configuration to ``false``.
  530. .. _relation:
  531. .. config:option:: $cfg['Servers'][$i]['relation']
  532. :type: string or false
  533. :default: ``''``
  534. Since release 2.2.4 you can describe, in a special 'relation' table,
  535. which column is a key in another table (a foreign key). phpMyAdmin
  536. currently uses this to:
  537. * make clickable, when you browse the master table, the data values that
  538. point to the foreign table;
  539. * display in an optional tool-tip the "display column" when browsing the
  540. master table, if you move the mouse to a column containing a foreign
  541. key (use also the 'table\_info' table); (see :ref:`faqdisplay`)
  542. * in edit/insert mode, display a drop-down list of possible foreign keys
  543. (key value and "display column" are shown) (see :ref:`faq6_21`)
  544. * display links on the table properties page, to check referential
  545. integrity (display missing foreign keys) for each described key;
  546. * in query-by-example, create automatic joins (see :ref:`faq6_6`)
  547. * enable you to get a :term:`PDF` schema of
  548. your database (also uses the table\_coords table).
  549. The keys can be numeric or character.
  550. To allow the usage of this functionality:
  551. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  552. * put the relation table name in :config:option:`$cfg['Servers'][$i]['relation']`
  553. * now as normal user open phpMyAdmin and for each one of your tables
  554. where you want to use this feature, click :guilabel:`Structure/Relation view/`
  555. and choose foreign columns.
  556. This feature can be disabled by setting the configuration to ``false``.
  557. .. note::
  558. In the current version, ``master_db`` must be the same as ``foreign_db``.
  559. Those columns have been put in future development of the cross-db
  560. relations.
  561. .. _table_info:
  562. .. config:option:: $cfg['Servers'][$i]['table_info']
  563. :type: string or false
  564. :default: ``''``
  565. Since release 2.3.0 you can describe, in a special 'table\_info'
  566. table, which column is to be displayed as a tool-tip when moving the
  567. cursor over the corresponding key. This configuration variable will
  568. hold the name of this special table. To allow the usage of this
  569. functionality:
  570. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  571. * put the table name in :config:option:`$cfg['Servers'][$i]['table\_info']` (e.g.
  572. ``pma__table_info``)
  573. * then for each table where you want to use this feature, click
  574. "Structure/Relation view/Choose column to display" to choose the
  575. column.
  576. This feature can be disabled by setting the configuration to ``false``.
  577. .. seealso:: :ref:`faqdisplay`
  578. .. _table_coords:
  579. .. config:option:: $cfg['Servers'][$i]['table_coords']
  580. :type: string or false
  581. :default: ``''``
  582. The designer feature can save your page layout; by pressing the "Save page" or "Save page as"
  583. button in the expanding designer menu, you can customize the layout and have it loaded the next
  584. time you use the designer. That layout is stored in this table. Furthermore, this table is also
  585. required for using the PDF relation export feature, see
  586. :config:option:`$cfg['Servers'][$i]['pdf\_pages']` for additional details.
  587. .. config:option:: $cfg['Servers'][$i]['pdf_pages']
  588. :type: string or false
  589. :default: ``''``
  590. Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
  591. showing the relations between your tables. Further, the designer interface
  592. permits visually managing the relations. To do this it needs two tables
  593. "pdf\_pages" (storing information about the available :term:`PDF` pages)
  594. and "table\_coords" (storing coordinates where each table will be placed on
  595. a :term:`PDF` schema output). You must be using the "relation" feature.
  596. To allow the usage of this functionality:
  597. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  598. * put the correct table names in
  599. :config:option:`$cfg['Servers'][$i]['table\_coords']` and
  600. :config:option:`$cfg['Servers'][$i]['pdf\_pages']`
  601. This feature can be disabled by setting either of the configurations to ``false``.
  602. .. seealso:: :ref:`faqpdf`.
  603. .. _designer_coords:
  604. .. config:option:: $cfg['Servers'][$i]['designer_coords']
  605. :type: string
  606. :default: ``''``
  607. .. versionadded:: 2.10.0
  608. Since release 2.10.0 a Designer interface is available; it permits to
  609. visually manage the relations.
  610. .. deprecated:: 4.3.0
  611. This setting was removed and the Designer table positioning data is now stored into :config:option:`$cfg['Servers'][$i]['table\_coords']`.
  612. .. note::
  613. You can now delete the table `pma__designer_coords` from your phpMyAdmin configuration storage database and remove :config:option:`$cfg['Servers'][$i]['designer\_coords']` from your configuration file.
  614. .. _col_com:
  615. .. config:option:: $cfg['Servers'][$i]['column_info']
  616. :type: string or false
  617. :default: ``''``
  618. This part requires a content update! Since release 2.3.0 you can
  619. store comments to describe each column for each table. These will then
  620. be shown on the "printview".
  621. Starting with release 2.5.0, comments are consequently used on the table
  622. property pages and table browse view, showing up as tool-tips above the
  623. column name (properties page) or embedded within the header of table in
  624. browse view. They can also be shown in a table dump. Please see the
  625. relevant configuration directives later on.
  626. Also new in release 2.5.0 is a MIME- transformation system which is also
  627. based on the following table structure. See :ref:`transformations` for
  628. further information. To use the MIME- transformation system, your
  629. column\_info table has to have the three new columns 'mimetype',
  630. 'transformation', 'transformation\_options'.
  631. Starting with release 4.3.0, a new input-oriented transformation system
  632. has been introduced. Also, backward compatibility code used in the old
  633. transformations system was removed. As a result, an update to column\_info
  634. table is necessary for previous transformations and the new input-oriented
  635. transformation system to work. phpMyAdmin will upgrade it automatically
  636. for you by analyzing your current column\_info table structure.
  637. However, if something goes wrong with the auto-upgrade then you can
  638. use the SQL script found in ``./sql/upgrade_column_info_4_3_0+.sql``
  639. to upgrade it manually.
  640. To allow the usage of this functionality:
  641. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  642. * put the table name in :config:option:`$cfg['Servers'][$i]['column\_info']` (e.g.
  643. ``pma__column_info``)
  644. * to update your PRE-2.5.0 Column\_comments table use this: and
  645. remember that the Variable in :file:`config.inc.php` has been renamed from
  646. :samp:`$cfg['Servers'][$i]['column\_comments']` to
  647. :config:option:`$cfg['Servers'][$i]['column\_info']`
  648. .. code-block:: mysql
  649. ALTER TABLE `pma__column_comments`
  650. ADD `mimetype` VARCHAR( 255 ) NOT NULL,
  651. ADD `transformation` VARCHAR( 255 ) NOT NULL,
  652. ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
  653. * to update your PRE-4.3.0 Column\_info table manually use this
  654. ``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
  655. This feature can be disabled by setting the configuration to ``false``.
  656. .. note::
  657. For auto-upgrade functionality to work, your
  658. :config:option:`$cfg['Servers'][$i]['controluser']` must have ALTER privilege on
  659. ``phpmyadmin`` database. See the `MySQL documentation for GRANT
  660. <https://dev.mysql.com/doc/refman/5.7/en/grant.html>`_ on how to
  661. ``GRANT`` privileges to a user.
  662. .. _history:
  663. .. config:option:: $cfg['Servers'][$i]['history']
  664. :type: string or false
  665. :default: ``''``
  666. Since release 2.5.0 you can store your :term:`SQL` history, which means all
  667. queries you entered manually into the phpMyAdmin interface. If you don't
  668. want to use a table-based history, you can use the JavaScript-based
  669. history.
  670. Using that, all your history items are deleted when closing the window.
  671. Using :config:option:`$cfg['QueryHistoryMax']` you can specify an amount of
  672. history items you want to have on hold. On every login, this list gets cut
  673. to the maximum amount.
  674. The query history is only available if JavaScript is enabled in
  675. your browser.
  676. To allow the usage of this functionality:
  677. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  678. * put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
  679. ``pma__history``)
  680. This feature can be disabled by setting the configuration to ``false``.
  681. .. _recent:
  682. .. config:option:: $cfg['Servers'][$i]['recent']
  683. :type: string or false
  684. :default: ``''``
  685. Since release 3.5.0 you can show recently used tables in the
  686. navigation panel. It helps you to jump across table directly, without
  687. the need to select the database, and then select the table. Using
  688. :config:option:`$cfg['NumRecentTables']` you can configure the maximum number
  689. of recent tables shown. When you select a table from the list, it will jump to
  690. the page specified in :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
  691. Without configuring the storage, you can still access the recently used tables,
  692. but it will disappear after you logout.
  693. To allow the usage of this functionality persistently:
  694. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  695. * put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
  696. ``pma__recent``)
  697. This feature can be disabled by setting the configuration to ``false``.
  698. .. _favorite:
  699. .. config:option:: $cfg['Servers'][$i]['favorite']
  700. :type: string or false
  701. :default: ``''``
  702. Since release 4.2.0 you can show a list of selected tables in the
  703. navigation panel. It helps you to jump to the table directly, without
  704. the need to select the database, and then select the table. When you
  705. select a table from the list, it will jump to the page specified in
  706. :config:option:`$cfg['NavigationTreeDefaultTabTable']`.
  707. You can add tables to this list or remove tables from it in database
  708. structure page by clicking on the star icons next to table names. Using
  709. :config:option:`$cfg['NumFavoriteTables']` you can configure the maximum
  710. number of favorite tables shown.
  711. Without configuring the storage, you can still access the favorite tables,
  712. but it will disappear after you logout.
  713. To allow the usage of this functionality persistently:
  714. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  715. * put the table name in :config:option:`$cfg['Servers'][$i]['favorite']` (e.g.
  716. ``pma__favorite``)
  717. This feature can be disabled by setting the configuration to ``false``.
  718. .. _table_uiprefs:
  719. .. config:option:: $cfg['Servers'][$i]['table_uiprefs']
  720. :type: string or false
  721. :default: ``''``
  722. Since release 3.5.0 phpMyAdmin can be configured to remember several
  723. things (sorted column :config:option:`$cfg['RememberSorting']`, column order,
  724. and column visibility from a database table) for browsing tables. Without
  725. configuring the storage, these features still can be used, but the values will
  726. disappear after you logout.
  727. To allow the usage of these functionality persistently:
  728. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  729. * put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
  730. ``pma__table_uiprefs``)
  731. This feature can be disabled by setting the configuration to ``false``.
  732. .. config:option:: $cfg['Servers'][$i]['users']
  733. :type: string or false
  734. :default: ``''``
  735. The table used by phpMyAdmin to store user name information for associating with user groups.
  736. See the next entry on :config:option:`$cfg['Servers'][$i]['usergroups']` for more details
  737. and the suggested settings.
  738. .. config:option:: $cfg['Servers'][$i]['usergroups']
  739. :type: string or false
  740. :default: ``''``
  741. Since release 4.1.0 you can create different user groups with menu items
  742. attached to them. Users can be assigned to these groups and the logged in
  743. user would only see menu items configured to the usergroup they are assigned to.
  744. To do this it needs two tables "usergroups" (storing allowed menu items for each
  745. user group) and "users" (storing users and their assignments to user groups).
  746. To allow the usage of this functionality:
  747. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  748. * put the correct table names in
  749. :config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
  750. :config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
  751. This feature can be disabled by setting either of the configurations to ``false``.
  752. .. seealso:: :ref:`configurablemenus`
  753. .. _navigationhiding:
  754. .. config:option:: $cfg['Servers'][$i]['navigationhiding']
  755. :type: string or false
  756. :default: ``''``
  757. Since release 4.1.0 you can hide/show items in the navigation tree.
  758. To allow the usage of this functionality:
  759. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  760. * put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
  761. ``pma__navigationhiding``)
  762. This feature can be disabled by setting the configuration to ``false``.
  763. .. _central_columns:
  764. .. config:option:: $cfg['Servers'][$i]['central_columns']
  765. :type: string or false
  766. :default: ``''``
  767. Since release 4.3.0 you can have a central list of columns per database.
  768. You can add/remove columns to the list as per your requirement. These columns
  769. in the central list will be available to use while you create a new column for
  770. a table or create a table itself. You can select a column from central list
  771. while creating a new column, it will save you from writing the same column definition
  772. over again or from writing different names for similar column.
  773. To allow the usage of this functionality:
  774. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  775. * put the table name in :config:option:`$cfg['Servers'][$i]['central_columns']` (e.g.
  776. ``pma__central_columns``)
  777. This feature can be disabled by setting the configuration to ``false``.
  778. .. _designer_settings:
  779. .. config:option:: $cfg['Servers'][$i]['designer_settings']
  780. :type: string or false
  781. :default: ``''``
  782. Since release 4.5.0 your designer settings can be remembered.
  783. Your choice regarding 'Angular/Direct Links', 'Snap to Grid', 'Toggle Relation Lines',
  784. 'Small/Big All', 'Move Menu' and 'Pin Text' can be remembered persistently.
  785. To allow the usage of this functionality:
  786. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  787. * put the table name in :config:option:`$cfg['Servers'][$i]['designer_settings']` (e.g.
  788. ``pma__designer_settings``)
  789. This feature can be disabled by setting the configuration to ``false``.
  790. .. _savedsearches:
  791. .. config:option:: $cfg['Servers'][$i]['savedsearches']
  792. :type: string or false
  793. :default: ``''``
  794. Since release 4.2.0 you can save and load query-by-example searches from the Database > Query panel.
  795. To allow the usage of this functionality:
  796. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  797. * put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g.
  798. ``pma__savedsearches``)
  799. This feature can be disabled by setting the configuration to ``false``.
  800. .. _export_templates:
  801. .. config:option:: $cfg['Servers'][$i]['export_templates']
  802. :type: string or false
  803. :default: ``''``
  804. Since release 4.5.0 you can save and load export templates.
  805. To allow the usage of this functionality:
  806. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  807. * put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g.
  808. ``pma__export_templates``)
  809. This feature can be disabled by setting the configuration to ``false``.
  810. .. _tracking:
  811. .. config:option:: $cfg['Servers'][$i]['tracking']
  812. :type: string or false
  813. :default: ``''``
  814. Since release 3.3.x a tracking mechanism is available. It helps you to
  815. track every :term:`SQL` command which is
  816. executed by phpMyAdmin. The mechanism supports logging of data
  817. manipulation and data definition statements. After enabling it you can
  818. create versions of tables.
  819. The creation of a version has two effects:
  820. * phpMyAdmin saves a snapshot of the table, including structure and
  821. indexes.
  822. * phpMyAdmin logs all commands which change the structure and/or data of
  823. the table and links these commands with the version number.
  824. Of course you can view the tracked changes. On the :guilabel:`Tracking`
  825. page a complete report is available for every version. For the report you
  826. can use filters, for example you can get a list of statements within a date
  827. range. When you want to filter usernames you can enter \* for all names or
  828. you enter a list of names separated by ','. In addition you can export the
  829. (filtered) report to a file or to a temporary database.
  830. To allow the usage of this functionality:
  831. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  832. * put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
  833. ``pma__tracking``)
  834. This feature can be disabled by setting the configuration to ``false``.
  835. .. _tracking2:
  836. .. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
  837. :type: boolean
  838. :default: false
  839. Whether the tracking mechanism creates versions for tables and views
  840. automatically.
  841. If this is set to true and you create a table or view with
  842. * CREATE TABLE ...
  843. * CREATE VIEW ...
  844. and no version exists for it, the mechanism will create a version for
  845. you automatically.
  846. .. _tracking3:
  847. .. config:option:: $cfg['Servers'][$i]['tracking_default_statements']
  848. :type: string
  849. :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'``
  850. Defines the list of statements the auto-creation uses for new
  851. versions.
  852. .. _tracking4:
  853. .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_view']
  854. :type: boolean
  855. :default: true
  856. Whether a DROP VIEW IF EXISTS statement will be added as first line to
  857. the log when creating a view.
  858. .. _tracking5:
  859. .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_table']
  860. :type: boolean
  861. :default: true
  862. Whether a DROP TABLE IF EXISTS statement will be added as first line
  863. to the log when creating a table.
  864. .. _tracking6:
  865. .. config:option:: $cfg['Servers'][$i]['tracking_add_drop_database']
  866. :type: boolean
  867. :default: true
  868. Whether a DROP DATABASE IF EXISTS statement will be added as first
  869. line to the log when creating a database.
  870. .. _userconfig:
  871. .. config:option:: $cfg['Servers'][$i]['userconfig']
  872. :type: string or false
  873. :default: ``''``
  874. Since release 3.4.x phpMyAdmin allows users to set most preferences by
  875. themselves and store them in the database.
  876. If you don't allow for storing preferences in
  877. :config:option:`$cfg['Servers'][$i]['pmadb']`, users can still personalize
  878. phpMyAdmin, but settings will be saved in browser's local storage, or, it
  879. is is unavailable, until the end of session.
  880. To allow the usage of this functionality:
  881. * set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
  882. * put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
  883. This feature can be disabled by setting the configuration to ``false``.
  884. .. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
  885. :type: integer
  886. :default: 100
  887. Maximum number of rows saved in
  888. :config:option:`$cfg['Servers'][$i]['table_uiprefs']` table.
  889. When tables are dropped or renamed,
  890. :config:option:`$cfg['Servers'][$i]['table_uiprefs']` may contain invalid data
  891. (referring to tables which no longer exist). We only keep this number of newest
  892. rows in :config:option:`$cfg['Servers'][$i]['table_uiprefs']` and automatically
  893. delete older rows.
  894. .. config:option:: $cfg['Servers'][$i]['SessionTimeZone']
  895. :type: string
  896. :default: ``''``
  897. Sets the time zone used by phpMyAdmin. Leave blank to use the time zone of your
  898. database server. Possible values are explained at
  899. https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html
  900. This is useful when your database server uses a time zone which is different from the
  901. time zone you want to use in phpMyAdmin.
  902. .. config:option:: $cfg['Servers'][$i]['AllowRoot']
  903. :type: boolean
  904. :default: true
  905. Whether to allow root access. This is just a shortcut for the
  906. :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` below.
  907. .. config:option:: $cfg['Servers'][$i]['AllowNoPassword']
  908. :type: boolean
  909. :default: false
  910. Whether to allow logins without a password. The default value of
  911. ``false`` for this parameter prevents unintended access to a MySQL
  912. server with was left with an empty password for root or on which an
  913. anonymous (blank) user is defined.
  914. .. _servers_allowdeny_order:
  915. .. config:option:: $cfg['Servers'][$i]['AllowDeny']['order']
  916. :type: string
  917. :default: ``''``
  918. If your rule order is empty, then :term:`IP`
  919. authorization is disabled.
  920. If your rule order is set to
  921. ``'deny,allow'`` then the system applies all deny rules followed by
  922. allow rules. Access is allowed by default. Any client which does not
  923. match a Deny command or does match an Allow command will be allowed
  924. access to the server.
  925. If your rule order is set to ``'allow,deny'``
  926. then the system applies all allow rules followed by deny rules. Access
  927. is denied by default. Any client which does not match an Allow
  928. directive or does match a Deny directive will be denied access to the
  929. server.
  930. If your rule order is set to ``'explicit'``, authorization is
  931. performed in a similar fashion to rule order 'deny,allow', with the
  932. added restriction that your host/username combination **must** be
  933. listed in the *allow* rules, and not listed in the *deny* rules. This
  934. is the **most** secure means of using Allow/Deny rules, and was
  935. available in Apache by specifying allow and deny rules without setting
  936. any order.
  937. Please also see :config:option:`$cfg['TrustedProxies']` for
  938. detecting IP address behind proxies.
  939. .. _servers_allowdeny_rules:
  940. .. config:option:: $cfg['Servers'][$i]['AllowDeny']['rules']
  941. :type: array of strings
  942. :default: array()
  943. The general format for the rules is as such:
  944. .. code-block:: none
  945. <'allow' | 'deny'> <username> [from] <ipmask>
  946. If you wish to match all users, it is possible to use a ``'%'`` as a
  947. wildcard in the *username* field.
  948. There are a few shortcuts you can
  949. use in the *ipmask* field as well (please note that those containing
  950. SERVER\_ADDRESS might not be available on all webservers):
  951. .. code-block:: none
  952. 'all' -> 0.0.0.0/0
  953. 'localhost' -> 127.0.0.1/8
  954. 'localnetA' -> SERVER_ADDRESS/8
  955. 'localnetB' -> SERVER_ADDRESS/16
  956. 'localnetC' -> SERVER_ADDRESS/24
  957. Having an empty rule list is equivalent to either using ``'allow %
  958. from all'`` if your rule order is set to ``'deny,allow'`` or ``'deny %
  959. from all'`` if your rule order is set to ``'allow,deny'`` or
  960. ``'explicit'``.
  961. For the :term:`IP Address` matching
  962. system, the following work:
  963. * ``xxx.xxx.xxx.xxx`` (an exact :term:`IP Address`)
  964. * ``xxx.xxx.xxx.[yyy-zzz]`` (an :term:`IP Address` range)
  965. * ``xxx.xxx.xxx.xxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IP` addresses)
  966. But the following does not work:
  967. * ``xxx.xxx.xxx.xx[yyy-zzz]`` (partial :term:`IP` address range)
  968. For :term:`IPv6` addresses, the following work:
  969. * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`` (an exact :term:`IPv6` address)
  970. * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]`` (an :term:`IPv6` address range)
  971. * ``xxxx:xxxx:xxxx:xxxx/nn`` (CIDR, Classless Inter-Domain Routing type :term:`IPv6` addresses)
  972. But the following does not work:
  973. * ``xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]`` (partial :term:`IPv6` address range)
  974. Examples:
  975. .. code-block:: none
  976. $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
  977. $cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow bob from all'];
  978. // Allow only 'bob' to connect from any host
  979. $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
  980. $cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow mary from 192.168.100.[50-100]'];
  981. // Allow only 'mary' to connect from host 192.168.100.50 through 192.168.100.100
  982. $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
  983. $cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow % from 192.168.[5-6].10'];
  984. // Allow any user to connect from host 192.168.5.10 or 192.168.6.10
  985. $cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
  986. $cfg['Servers'][$i]['AllowDeny']['rules'] = ['allow root from 192.168.5.50','allow % from 192.168.6.10'];
  987. // Allow any user to connect from 192.168.6.10, and additionally allow root to connect from 192.168.5.50
  988. .. config:option:: $cfg['Servers'][$i]['DisableIS']
  989. :type: boolean
  990. :default: false
  991. Disable using ``INFORMATION_SCHEMA`` to retrieve information (use
  992. ``SHOW`` commands instead), because of speed issues when many
  993. databases are present.
  994. .. note::
  995. Enabling this option might give you a big performance boost on older
  996. MySQL servers.
  997. .. config:option:: $cfg['Servers'][$i]['SignonScript']
  998. :type: string
  999. :default: ``''``
  1000. .. versionadded:: 3.5.0
  1001. Name of PHP script to be sourced and executed to obtain login
  1002. credentials. This is alternative approach to session based single
  1003. signon. The script has to provide a function called
  1004. ``get_login_credentials`` which returns list of username and
  1005. password, accepting single parameter of existing username (can be
  1006. empty). See :file:`examples/signon-script.php` for an example:
  1007. .. literalinclude:: ../examples/signon-script.php
  1008. :language: php
  1009. .. seealso:: :ref:`auth_signon`
  1010. .. config:option:: $cfg['Servers'][$i]['SignonSession']
  1011. :type: string
  1012. :default: ``''``
  1013. Name of session which will be used for signon authentication method.
  1014. You should use something different than ``phpMyAdmin``, because this
  1015. is session which phpMyAdmin uses internally. Takes effect only if
  1016. :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
  1017. .. seealso:: :ref:`auth_signon`
  1018. .. config:option:: $cfg['Servers'][$i]['SignonCookieParams']
  1019. :type: array
  1020. :default: ``array()``
  1021. .. versionadded:: 4.7.0
  1022. An associative array of session cookie parameters of other authentication system.
  1023. It is not needed if the other system doesn't use session_set_cookie_params().
  1024. Keys should include 'lifetime', 'path', 'domain', 'secure' or 'httponly'.
  1025. Valid values are mentioned in `session_get_cookie_params <https://www.php.net/manual/en/
  1026. function.session-get-cookie-params.php>`_, they should be set to same values as the
  1027. other application uses. Takes effect only if
  1028. :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured.
  1029. .. seealso:: :ref:`auth_signon`
  1030. .. config:option:: $cfg['Servers'][$i]['SignonURL']
  1031. :type: string
  1032. :default: ``''``
  1033. :term:`URL` where user will be redirected
  1034. to log in for signon authentication method. Should be absolute
  1035. including protocol.
  1036. .. seealso:: :ref:`auth_signon`
  1037. .. config:option:: $cfg['Servers'][$i]['LogoutURL']
  1038. :type: string
  1039. :default: ``''``
  1040. :term:`URL` where user will be redirected
  1041. after logout (doesn't affect config authentication method). Should be
  1042. absolute including protocol.
  1043. Generic settings
  1044. ----------------
  1045. .. config:option:: $cfg['DisableShortcutKeys']
  1046. :type: boolean
  1047. :default: false
  1048. You can disable phpMyAdmin shortcut keys by setting :config:option:`$cfg['DisableShortcutKeys']` to false.
  1049. .. config:option:: $cfg['ServerDefault']
  1050. :type: integer
  1051. :default: 1
  1052. If you have more than one server configured, you can set
  1053. :config:option:`$cfg['ServerDefault']` to any one of them to autoconnect to that
  1054. server when phpMyAdmin is started, or set it to 0 to be given a list
  1055. of servers without logging in.
  1056. If you have only one server configured,
  1057. :config:option:`$cfg['ServerDefault']` MUST be set to that server.
  1058. .. config:option:: $cfg['VersionCheck']
  1059. :type: boolean
  1060. :default: true
  1061. Enables check for latest versions using JavaScript on the main phpMyAdmin
  1062. page or by directly accessing `index.php?route=/version-check`.
  1063. .. note::
  1064. This setting can be adjusted by your vendor.
  1065. .. config:option:: $cfg['ProxyUrl']
  1066. :type: string
  1067. :default: ""
  1068. The url of the proxy to be used when phpmyadmin needs to access the outside
  1069. internet such as when retrieving the latest version info or submitting error
  1070. reports. You need this if the server where phpMyAdmin is installed does not
  1071. have direct access to the internet.
  1072. The format is: "hostname:portnumber"
  1073. .. config:option:: $cfg['ProxyUser']
  1074. :type: string
  1075. :default: ""
  1076. The username for authenticating with the proxy. By default, no
  1077. authentication is performed. If a username is supplied, Basic
  1078. Authentication will be performed. No other types of authentication
  1079. are currently supported.
  1080. .. config:option:: $cfg['ProxyPass']
  1081. :type: string
  1082. :default: ""
  1083. The password for authenticating with the proxy.
  1084. .. config:option:: $cfg['MaxDbList']
  1085. :type: integer
  1086. :default: 100
  1087. The maximum number of database names to be displayed in the main panel's
  1088. database list.
  1089. .. config:option:: $cfg['MaxTableList']
  1090. :type: integer
  1091. :default: 250
  1092. The maximum number of table names to be displayed in the main panel's
  1093. list (except on the Export page).
  1094. .. config:option:: $cfg['ShowHint']
  1095. :type: boolean
  1096. :default: true
  1097. Whether or not to show hints (for example, hints when hovering over
  1098. table headers).
  1099. .. config:option:: $cfg['MaxCharactersInDisplayedSQL']
  1100. :type: integer
  1101. :default: 1000
  1102. The maximum number of characters when a :term:`SQL` query is displayed. The
  1103. default limit of 1000 should be correct to avoid the display of tons of
  1104. hexadecimal codes that represent BLOBs, but some users have real
  1105. :term:`SQL` queries that are longer than 1000 characters. Also, if a
  1106. query's length exceeds this limit, this query is not saved in the history.
  1107. .. config:option:: $cfg['PersistentConnections']
  1108. :type: boolean
  1109. :default: false
  1110. Whether `persistent connections <https://www.php.net/manual/en/features
  1111. .persistent-connections.php>`_ should be used or not. Works with
  1112. following extensions:
  1113. * mysql (`mysql\_pconnect <https://www.php.net/manual/en/function.mysql-
  1114. pconnect.php>`_),
  1115. * mysqli (requires PHP 5.3.0 or newer, `more information
  1116. <https://www.php.net/manual/en/mysqli.persistconns.php>`_).
  1117. .. config:option:: $cfg['ForceSSL']
  1118. :type: boolean
  1119. :default: false
  1120. .. deprecated:: 4.6.0
  1121. This setting is no longer available since phpMyAdmin 4.6.0. Please
  1122. adjust your webserver instead.
  1123. Whether to force using https while accessing phpMyAdmin. In a reverse
  1124. proxy setup, setting this to ``true`` is not supported.
  1125. .. note::
  1126. In some setups (like separate SSL proxy or load balancer) you might
  1127. have to set :config:option:`$cfg['PmaAbsoluteUri']` for correct
  1128. redirection.
  1129. .. config:option:: $cfg['MysqlSslWarningSafeHosts']
  1130. :type: array
  1131. :default: ``['127.0.0.1', 'localhost']``
  1132. This search is case-sensitive and will match the exact string only.
  1133. If your setup does not use SSL but is safe because you are using a
  1134. local connection or private network, you can add your hostname or :term:`IP` to the list.
  1135. You can also remove the default entries to only include yours.
  1136. This check uses the value of :config:option:`$cfg['Servers'][$i]['host']`.
  1137. .. versionadded:: 5.1.0
  1138. Example configuration
  1139. .. code-block:: php
  1140. $cfg['MysqlSslWarningSafeHosts'] = ['127.0.0.1', 'localhost', 'mariadb.local'];
  1141. .. config:option:: $cfg['ExecTimeLimit']
  1142. :type: integer [number of seconds]
  1143. :default: 300
  1144. Set the number of seconds a script is allowed to run. If seconds is
  1145. set to zero, no time limit is imposed. This setting is used while
  1146. importing/exporting dump files but has
  1147. no effect when PHP is running in safe mode.
  1148. .. config:option:: $cfg['SessionSavePath']
  1149. :type: string
  1150. :default: ``''``
  1151. Path for storing session data (`session\_save\_path PHP parameter
  1152. <https://www.php.net/session_save_path>`_).
  1153. .. warning::
  1154. This folder should not be publicly accessible through the webserver,
  1155. otherwise you risk leaking private data from your session.
  1156. .. config:option:: $cfg['MemoryLimit']
  1157. :type: string [number of bytes]
  1158. :default: ``'-1'``
  1159. Set the number of bytes a script is allowed to allocate. If set to
  1160. ``'-1'``, no limit is imposed. If set to ``'0'``, no change of the
  1161. memory limit is attempted and the :file:`php.ini` ``memory_limit`` is
  1162. used.
  1163. This setting is used while importing/exporting dump files
  1164. so you definitely don't want to put here a too low
  1165. value. It has no effect when PHP is running in safe mode.
  1166. You can also use any string as in :file:`php.ini`, eg. '16M'. Ensure you
  1167. don't omit the suffix (16 means 16 bytes!)
  1168. .. config:option:: $cfg['SkipLockedTables']
  1169. :type: boolean
  1170. :default: false
  1171. Mark used tables and make it possible to show databases with locked
  1172. tables (since MySQL 3.23.30).
  1173. .. config:option:: $cfg['ShowSQL']
  1174. :type: boolean
  1175. :default: true
  1176. Defines whether :term:`SQL` queries
  1177. generated by phpMyAdmin should be displayed or not.
  1178. .. config:option:: $cfg['RetainQueryBox']
  1179. :type: boolean
  1180. :default: false
  1181. Defines whether the :term:`SQL` query box
  1182. should be kept displayed after its submission.
  1183. .. config:option:: $cfg['CodemirrorEnable']
  1184. :type: boolean
  1185. :default: true
  1186. Defines whether to use a Javascript code editor for SQL query boxes.
  1187. CodeMirror provides syntax highlighting and line numbers. However,
  1188. middle-clicking for pasting the clipboard contents in some Linux
  1189. distributions (such as Ubuntu) is not supported by all browsers.
  1190. .. config:option:: $cfg['DefaultForeignKeyChecks']
  1191. :type: string
  1192. :default: ``'default'``
  1193. Default value of the checkbox for foreign key checks, to disable/enable
  1194. foreign key checks for certain queries. The possible values are ``'default'``,
  1195. ``'enable'`` or ``'disable'``. If set to ``'default'``, the value of the
  1196. MySQL variable ``FOREIGN_KEY_CHECKS`` is used.
  1197. .. config:option:: $cfg['AllowUserDropDatabase']
  1198. :type: boolean
  1199. :default: false
  1200. .. warning::
  1201. This is not a security measure as there will be always ways to
  1202. circumvent this. If you want to prohibit users from dropping databases,
  1203. revoke their corresponding DROP privilege.
  1204. Defines whether normal users (non-administrator) are allowed to delete
  1205. their own database or not. If set as false, the link :guilabel:`Drop
  1206. Database` will not be shown, and even a ``DROP DATABASE mydatabase`` will
  1207. be rejected. Quite practical for :term:`ISP` 's with many customers.
  1208. This limitation of :term:`SQL` queries is not as strict as when using MySQL
  1209. privileges. This is due to nature of :term:`SQL` queries which might be
  1210. quite complicated. So this choice should be viewed as help to avoid
  1211. accidental dropping rather than strict privilege limitation.
  1212. .. config:option:: $cfg['Confirm']
  1213. :type: boolean
  1214. :default: true
  1215. Whether a warning ("Are your really sure...") should be displayed when
  1216. you're about to lose data.
  1217. .. config:option:: $cfg['UseDbSearch']
  1218. :type: boolean
  1219. :default: true
  1220. Define whether the "search string inside database" is enabled or not.
  1221. .. config:option:: $cfg['IgnoreMultiSubmitErrors']
  1222. :type: boolean
  1223. :default: false
  1224. Define whether phpMyAdmin will continue executing a multi-query
  1225. statement if one of the queries fails. Default is to abort execution.
  1226. .. config:option:: $cfg['enable_drag_drop_import']
  1227. :type: boolean
  1228. :default: true
  1229. Whether or not the drag and drop import feature is enabled.
  1230. When enabled, a user can drag a file in to their browser and phpMyAdmin will
  1231. attempt to import the file.
  1232. Cookie authentication options
  1233. -----------------------------
  1234. .. config:option:: $cfg['blowfish_secret']
  1235. :type: string
  1236. :default: ``''``
  1237. The "cookie" auth\_type uses AES algorithm to encrypt the password. If you
  1238. are using the "cookie" auth\_type, enter here a random passphrase of your
  1239. choice. It will be used internally by the AES algorithm: you wont be
  1240. prompted for this passphrase.
  1241. The secret should be 32 characters long. Using shorter will lead to weaker security
  1242. of encrypted cookies, using longer will cause no harm.
  1243. .. note::
  1244. The configuration is called blowfish_secret for historical reasons as
  1245. Blowfish algorithm was originally used to do the encryption.
  1246. .. versionchanged:: 3.1.0
  1247. Since version 3.1.0 phpMyAdmin can generate this on the fly, but it
  1248. makes a bit weaker security as this generated secret is stored in
  1249. session and furthermore it makes impossible to recall user name from
  1250. cookie.
  1251. .. config:option:: $cfg['CookieSameSite']
  1252. :type: string
  1253. :default: ``'Strict'``
  1254. .. versionadded:: 5.1.0
  1255. It sets SameSite attribute of the Set-Cookie :term:`HTTP` response header.
  1256. Valid values are:
  1257. * ``Lax``
  1258. * ``Strict``
  1259. * ``None``
  1260. .. seealso:: `rfc6265 bis <https://tools.ietf.org/id/draft-ietf-httpbis-rfc6265bis-03.html#rfc.section.5.3.7>`_
  1261. .. config:option:: $cfg['LoginCookieRecall']
  1262. :type: boolean
  1263. :default: true
  1264. Define whether the previous login should be recalled or not in cookie
  1265. authentication mode.
  1266. This is automatically disabled if you do not have
  1267. configured :config:option:`$cfg['blowfish_secret']`.
  1268. .. config:option:: $cfg['LoginCookieValidity']
  1269. :type: integer [number of seconds]
  1270. :default: 1440
  1271. Define how long a login cookie is valid. Please note that php
  1272. configuration option `session.gc\_maxlifetime
  1273. <https://www.php.net/manual/en/session.configuration.php#ini.session.gc-
  1274. maxlifetime>`_ might limit session validity and if the session is lost,
  1275. the login cookie is also invalidated. So it is a good idea to set
  1276. ``session.gc_maxlifetime`` at least to the same value of
  1277. :config:option:`$cfg['LoginCookieValidity']`.
  1278. .. config:option:: $cfg['LoginCookieStore']
  1279. :type: integer [number of seconds]
  1280. :default: 0
  1281. Define how long login cookie should be stored in browser. Default 0
  1282. means that it will be kept for existing session. This is recommended
  1283. for not trusted environments.
  1284. .. config:option:: $cfg['LoginCookieDeleteAll']
  1285. :type: boolean
  1286. :default: true
  1287. If enabled (default), logout deletes cookies for all servers,
  1288. otherwise only for current one. Setting this to false makes it easy to
  1289. forget to log out from other server, when you are using more of them.
  1290. .. _AllowArbitraryServer:
  1291. .. config:option:: $cfg['AllowArbitraryServer']
  1292. :type: boolean
  1293. :default: false
  1294. If enabled, allows you to log in to arbitrary servers using cookie
  1295. authentication.
  1296. .. note::
  1297. Please use this carefully, as this may allow users access to MySQL servers
  1298. behind the firewall where your :term:`HTTP` server is placed.
  1299. See also :config:option:`$cfg['ArbitraryServerRegexp']`.
  1300. .. config:option:: $cfg['ArbitraryServerRegexp']
  1301. :type: string
  1302. :default: ``''``
  1303. Restricts the MySQL servers to which the user can log in when
  1304. :config:option:`$cfg['AllowArbitraryServer']` is enabled by
  1305. matching the :term:`IP` or the hostname of the MySQL server
  1306. to the given regular expression. The regular expression must be enclosed
  1307. with a delimiter character.
  1308. It is recommended to include start and end symbols in the regular
  1309. expression, so that you can avoid partial matches on the string.
  1310. **Examples:**
  1311. .. code-block:: php
  1312. // Allow connection to three listed servers:
  1313. $cfg['ArbitraryServerRegexp'] = '/^(server|another|yetdifferent)$/';
  1314. // Allow connection to range of IP addresses:
  1315. $cfg['ArbitraryServerRegexp'] = '@^192\.168\.0\.[0-9]{1,}$@';
  1316. // Allow connection to server name ending with -mysql:
  1317. $cfg['ArbitraryServerRegexp'] = '@^[^:]\-mysql$@';
  1318. .. note::
  1319. The whole server name is matched, it can include port as well. Due to
  1320. way MySQL is permissive in connection parameters, it is possible to use
  1321. connection strings as ```server:3306-mysql```. This can be used to
  1322. bypass regular expression by the suffix, while connecting to another
  1323. server.
  1324. .. config:option:: $cfg['CaptchaMethod']
  1325. :type: string
  1326. :default: ``'invisible'``
  1327. Valid values are:
  1328. * ``'invisible'`` Use an invisible captcha checking method;
  1329. * ``'checkbox'`` Use a checkbox to confirm the user is not a robot.
  1330. .. versionadded:: 5.0.3
  1331. .. config:option:: $cfg['CaptchaApi']
  1332. :type: string
  1333. :default: ``'https://www.google.com/recaptcha/api.js'``
  1334. .. versionadded:: 5.1.0
  1335. The URL for the reCaptcha v2 service's API, either Google's or a compatible one.
  1336. .. config:option:: $cfg['CaptchaCsp']
  1337. :type: string
  1338. :default: ``'https://apis.google.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://ssl.gstatic.com/'``
  1339. .. versionadded:: 5.1.0
  1340. The Content-Security-Policy snippet (URLs from which to allow embedded content)
  1341. for the reCaptcha v2 service, either Google's or a compatible one.
  1342. .. config:option:: $cfg['CaptchaRequestParam']
  1343. :type: string
  1344. :default: ``'g-recaptcha'``
  1345. .. versionadded:: 5.1.0
  1346. The request parameter used for the reCaptcha v2 service.
  1347. .. config:option:: $cfg['CaptchaResponseParam']
  1348. :type: string
  1349. :default: ``'g-recaptcha-response'``
  1350. .. versionadded:: 5.1.0
  1351. The response parameter used for the reCaptcha v2 service.
  1352. .. config:option:: $cfg['CaptchaLoginPublicKey']
  1353. :type: string
  1354. :default: ``''``
  1355. The public key for the reCaptcha service that can be obtained from the
  1356. "Admin Console" on https://www.google.com/recaptcha/about/.
  1357. .. seealso:: <https://developers.google.com/recaptcha/docs/v3>
  1358. reCaptcha will be then used in :ref:`cookie`.
  1359. .. config:option:: $cfg['CaptchaLoginPrivateKey']
  1360. :type: string
  1361. :default: ``''``
  1362. The private key for the reCaptcha service that can be obtained from the
  1363. "Admin Console" on https://www.google.com/recaptcha/about/.
  1364. .. seealso:: <https://developers.google.com/recaptcha/docs/v3>
  1365. reCaptcha will be then used in :ref:`cookie`.
  1366. .. config:option:: $cfg['CaptchaSiteVerifyURL']
  1367. :type: string
  1368. :default: ``''``
  1369. The URL for the reCaptcha service to do siteverify action.
  1370. reCaptcha will be then used in :ref:`cookie`.
  1371. .. versionadded:: 5.1.0
  1372. Navigation panel setup
  1373. ----------------------
  1374. .. config:option:: $cfg['ShowDatabasesNavigationAsTree']
  1375. :type: boolean
  1376. :default: true
  1377. In the navigation panel, replaces the database tree with a selector
  1378. .. config:option:: $cfg['FirstLevelNavigationItems']
  1379. :type: integer
  1380. :default: 100
  1381. The number of first level databases that can be displayed on each page
  1382. of navigation tree.
  1383. .. config:option:: $cfg['MaxNavigationItems']
  1384. :type: integer
  1385. :default: 50
  1386. The number of items (tables, columns, indexes) that can be displayed on each
  1387. page of the navigation tree.
  1388. .. config:option:: $cfg['NavigationTreeEnableGrouping']
  1389. :type: boolean
  1390. :default: true
  1391. Defines whether to group the databases based on a common prefix
  1392. in their name :config:option:`$cfg['NavigationTreeDbSeparator']`.
  1393. .. config:option:: $cfg['NavigationTreeDbSeparator']
  1394. :type: string
  1395. :default: ``'_'``
  1396. The string used to separate the parts of the database name when
  1397. showing them in a tree.
  1398. .. config:option:: $cfg['NavigationTreeTableSeparator']
  1399. :type: string or array
  1400. :default: ``'__'``
  1401. Defines a string to be used to nest table spaces. This means if you have
  1402. tables like ``first__second__third`` this will be shown as a three-level
  1403. hierarchy like: first > second > third. If set to false or empty, the
  1404. feature is disabled. NOTE: You should not use this separator at the
  1405. beginning or end of a table name or multiple times after another without
  1406. any other characters in between.
  1407. .. config:option:: $cfg['NavigationTreeTableLevel']
  1408. :type: integer
  1409. :default: 1
  1410. Defines how many sublevels should be displayed when splitting up
  1411. tables by the above separator.
  1412. .. config:option:: $cfg['NumRecentTables']
  1413. :type: integer
  1414. :default: 10
  1415. The maximum number of recently used tables shown in the navigation
  1416. panel. Set this to 0 (zero) to disable the listing of recent tables.
  1417. .. config:option:: $cfg['NumFavoriteTables']
  1418. :type: integer
  1419. :default: 10
  1420. The maximum number of favorite tables shown in the navigation
  1421. panel. Set this to 0 (zero) to disable the listing of favorite tables.
  1422. .. config:option:: $cfg['ZeroConf']
  1423. :type: boolean
  1424. :default: true
  1425. Enables Zero Configuration mode in which the user will be offered a choice to
  1426. create phpMyAdmin configuration storage in the current database
  1427. or use the existing one, if already present.
  1428. This setting has no effect if the phpMyAdmin configuration storage database
  1429. is properly created and the related configuration directives (such as
  1430. :config:option:`$cfg['Servers'][$i]['pmadb']` and so on) are configured.
  1431. .. config:option:: $cfg['NavigationLinkWithMainPanel']
  1432. :type: boolean
  1433. :default: true
  1434. Defines whether or not to link with main panel by highlighting
  1435. the current database or table.
  1436. .. config:option:: $cfg['NavigationDisplayLogo']
  1437. :type: boolean
  1438. :default: true
  1439. Defines whether or not to display the phpMyAdmin logo at the top of
  1440. the navigation panel.
  1441. .. config:option:: $cfg['NavigationLogoLink']
  1442. :type: string
  1443. :default: ``'index.php'``
  1444. Enter the :term:`URL` where the logo in the navigation panel will point to.
  1445. For use especially with self made theme which changes this.
  1446. For relative/internal URLs, you need to have leading `` ./ `` or trailing characters `` ? `` such as ``'./index.php?route=/server/sql?'``.
  1447. For external URLs, you should include URL protocol schemes (``http`` or ``https``) with absolute URLs.
  1448. You may want to make the link open in a new browser tab, for that you need to use :config:option:`$cfg['NavigationLogoLinkWindow']`
  1449. .. config:option:: $cfg['NavigationLogoLinkWindow']
  1450. :type: string
  1451. :default: ``'main'``
  1452. Whether to open the linked page in the main window (``main``) or in a
  1453. new one (``new``). Note: use ``new`` if you are linking to
  1454. ``phpmyadmin.net``.
  1455. To open the link in the main window you will need to add the value of :config:option:`$cfg['NavigationLogoLink']`
  1456. to :config:option:`$cfg['CSPAllow']` because of the :term:`Content Security Policy` header.
  1457. .. config:option:: $cfg['NavigationTreeDisplayItemFilterMinimum']
  1458. :type: integer
  1459. :default: 30
  1460. Defines the minimum number of items (tables, views, routines and
  1461. events) to display a JavaScript filter box above the list of items in
  1462. the navigation tree.
  1463. To disable the filter completely some high number can be used (e.g. 9999)
  1464. .. config:option:: $cfg['NavigationTreeDisplayDbFilterMinimum']
  1465. :type: integer
  1466. :default: 30
  1467. Defines the minimum number of databases to display a JavaScript filter
  1468. box above the list of databases in the navigation tree.
  1469. To disable the filter completely some high number can be used
  1470. (e.g. 9999)
  1471. .. config:option:: $cfg['NavigationDisplayServers']
  1472. :type: boolean
  1473. :default: true
  1474. Defines whether or not to display a server choice at the top of the
  1475. navigation panel.
  1476. .. config:option:: $cfg['DisplayServersList']
  1477. :type: boolean
  1478. :default: false
  1479. Defines whether to display this server choice as links instead of in a
  1480. drop-down.
  1481. .. config:option:: $cfg['NavigationTreeDefaultTabTable']
  1482. :type: string
  1483. :default: ``'structure'``
  1484. Defines the tab displayed by default when clicking the small icon next
  1485. to each table name in the navigation panel. The possible values are the
  1486. localized equivalent of:
  1487. * ``structure``
  1488. * ``sql``
  1489. * ``search``
  1490. * ``insert``
  1491. * ``browse``
  1492. .. config:option:: $cfg['NavigationTreeDefaultTabTable2']
  1493. :type: string
  1494. :default: null
  1495. Defines the tab displayed by default when clicking the second small icon next
  1496. to each table name in the navigation panel. The possible values are the
  1497. localized equivalent of:
  1498. * ``(empty)``
  1499. * ``structure``
  1500. * ``sql``
  1501. * ``search``
  1502. * ``insert``
  1503. * ``browse``
  1504. .. config:option:: $cfg['NavigationTreeEnableExpansion']
  1505. :type: boolean
  1506. :default: true
  1507. Whether to offer the possibility of tree expansion in the navigation panel.
  1508. .. config:option:: $cfg['NavigationTreeShowTables']
  1509. :type: boolean
  1510. :default: true
  1511. Whether to show tables under database in the navigation panel.
  1512. .. config:option:: $cfg['NavigationTreeShowViews']
  1513. :type: boolean
  1514. :default: true
  1515. Whether to show views under database in the navigation panel.
  1516. .. config:option:: $cfg['NavigationTreeShowFunctions']
  1517. :type: boolean
  1518. :default: true
  1519. Whether to show functions under database in the navigation panel.
  1520. .. config:option:: $cfg['NavigationTreeShowProcedures']
  1521. :type: boolean
  1522. :default: true
  1523. Whether to show procedures under database in the navigation panel.
  1524. .. config:option:: $cfg['NavigationTreeShowEvents']
  1525. :type: boolean
  1526. :default: true
  1527. Whether to show events under database in the navigation panel.
  1528. .. config:option:: $cfg['NavigationWidth']
  1529. :type: integer
  1530. :default: 240
  1531. Navigation panel width, set to 0 to collapse it by default.
  1532. Main panel
  1533. ----------
  1534. .. config:option:: $cfg['ShowStats']
  1535. :type: boolean
  1536. :default: true
  1537. Defines whether or not to display space usage and statistics about
  1538. databases and tables. Note that statistics requires at least MySQL
  1539. 3.23.3 and that, at this date, MySQL doesn't return such information
  1540. for Berkeley DB tables.
  1541. .. config:option:: $cfg['ShowServerInfo']
  1542. :type: boolean
  1543. :default: true
  1544. Defines whether to display detailed server information on main page.
  1545. You can additionally hide more information by using
  1546. :config:option:`$cfg['Servers'][$i]['verbose']`.
  1547. .. config:option:: $cfg['ShowPhpInfo']
  1548. :type: boolean
  1549. :default: false
  1550. Defines whether to display the :guilabel:`PHP information` or not at
  1551. the starting main (right) frame.
  1552. Please note that to block the usage of ``phpinfo()`` in scripts, you have to
  1553. put this in your :file:`php.ini`:
  1554. .. code-block:: ini
  1555. disable_functions = phpinfo()
  1556. .. warning::
  1557. Enabling phpinfo page will leak quite a lot of information about server
  1558. setup. Is it not recommended to enable this on shared installations.
  1559. This might also make easier some remote attacks on your installations,
  1560. so enable this only when needed.
  1561. .. config:option:: $cfg['ShowChgPassword']
  1562. :type: boolean
  1563. :default: true
  1564. Defines whether to display the :guilabel:`Change password` link or not at
  1565. the starting main (right) frame. This setting does not check MySQL commands
  1566. entered directly.
  1567. Please note that enabling the :guilabel:`Change password` link has no effect
  1568. with config authentication mode: because of the hard coded password value
  1569. in the configuration file, end users can't be allowed to change their
  1570. passwords.
  1571. .. config:option:: $cfg['ShowCreateDb']
  1572. :type: boolean
  1573. :default: true
  1574. Defines whether to display the form for creating database or not at the
  1575. starting main (right) frame. This setting does not check MySQL commands
  1576. entered directly.
  1577. .. config:option:: $cfg['ShowGitRevision']
  1578. :type: boolean
  1579. :default: true
  1580. Defines whether to display information about the current Git revision (if
  1581. applicable) on the main panel.
  1582. .. config:option:: $cfg['MysqlMinVersion']
  1583. :type: array
  1584. Defines the minimum supported MySQL version. The default is chosen
  1585. by the phpMyAdmin team; however this directive was asked by a developer
  1586. of the Plesk control panel to ease integration with older MySQL servers
  1587. (where most of the phpMyAdmin features work).
  1588. Database structure
  1589. ------------------
  1590. .. config:option:: $cfg['ShowDbStructureCreation']
  1591. :type: boolean
  1592. :default: false
  1593. Defines whether the database structure page (tables list) has a
  1594. "Creation" column that displays when each table was created.
  1595. .. config:option:: $cfg['ShowDbStructureLastUpdate']
  1596. :type: boolean
  1597. :default: false
  1598. Defines whether the database structure page (tables list) has a "Last
  1599. update" column that displays when each table was last updated.
  1600. .. config:option:: $cfg['ShowDbStructureLastCheck']
  1601. :type: boolean
  1602. :default: false
  1603. Defines whether the database structure page (tables list) has a "Last
  1604. check" column that displays when each table was last checked.
  1605. .. config:option:: $cfg['HideStructureActions']
  1606. :type: boolean
  1607. :default: true
  1608. Defines whether the table structure actions are hidden under a "More"
  1609. drop-down.
  1610. .. config:option:: $cfg['ShowColumnComments']
  1611. :type: boolean
  1612. :default: true
  1613. Defines whether to show column comments as a column in the table structure view.
  1614. Browse mode
  1615. -----------
  1616. .. config:option:: $cfg['TableNavigationLinksMode']
  1617. :type: string
  1618. :default: ``'icons'``
  1619. Defines whether the table navigation links contain ``'icons'``, ``'text'``
  1620. or ``'both'``.
  1621. .. config:option:: $cfg['ActionLinksMode']
  1622. :type: string
  1623. :default: ``'both'``
  1624. If set to ``icons``, will display icons instead of text for db and table
  1625. properties links (like :guilabel:`Browse`, :guilabel:`Select`,
  1626. :guilabel:`Insert`, ...). Can be set to ``'both'``
  1627. if you want icons AND text. When set to ``text``, will only show text.
  1628. .. config:option:: $cfg['RowActionType']
  1629. :type: string
  1630. :default: ``'both'``
  1631. Whether to display icons or text or both icons and text in table row action
  1632. segment. Value can be either of ``'icons'``, ``'text'`` or ``'both'``.
  1633. .. config:option:: $cfg['ShowAll']
  1634. :type: boolean
  1635. :default: false
  1636. Defines whether a user should be displayed a "Show all" button in browse
  1637. mode or not in all cases. By default it is shown only on small tables (less
  1638. than 500 rows) to avoid performance issues while getting too many rows.
  1639. .. config:option:: $cfg['MaxRows']
  1640. :type: integer
  1641. :default: 25
  1642. Number of rows displayed when browsing a result set and no LIMIT
  1643. clause is used. If the result set contains more rows, "Previous" and
  1644. "Next" links will be shown. Possible values: 25,50,100,250,500.
  1645. .. config:option:: $cfg['Order']
  1646. :type: string
  1647. :default: ``'SMART'``
  1648. Defines whether columns are displayed in ascending (``ASC``) order, in
  1649. descending (``DESC``) order or in a "smart" (``SMART``) order - I.E.
  1650. descending order for columns of type TIME, DATE, DATETIME and
  1651. TIMESTAMP, ascending order else- by default.
  1652. .. versionchanged:: 3.4.0
  1653. Since phpMyAdmin 3.4.0 the default value is ``'SMART'``.
  1654. .. config:option:: $cfg['GridEditing']
  1655. :type: string
  1656. :default: ``'double-click'``
  1657. Defines which action (``double-click`` or ``click``) triggers grid
  1658. editing. Can be deactivated with the ``disabled`` value.
  1659. .. config:option:: $cfg['RelationalDisplay']
  1660. :type: string
  1661. :default: ``'K'``
  1662. Defines the initial behavior for Options > Relational. ``K``, which
  1663. is the default, displays the key while ``D`` shows the display column.
  1664. .. config:option:: $cfg['SaveCellsAtOnce']
  1665. :type: boolean
  1666. :default: false
  1667. Defines whether or not to save all edited cells at once for grid
  1668. editing.
  1669. Editing mode
  1670. ------------
  1671. .. config:option:: $cfg['ProtectBinary']
  1672. :type: boolean or string
  1673. :default: ``'blob'``
  1674. Defines whether ``BLOB`` or ``BINARY`` columns are protected from
  1675. editing when browsing a table's content. Valid values are:
  1676. * ``false`` to allow editing of all columns;
  1677. * ``'blob'`` to allow editing of all columns except ``BLOBS``;
  1678. * ``'noblob'`` to disallow editing of all columns except ``BLOBS`` (the
  1679. opposite of ``'blob'``);
  1680. * ``'all'`` to disallow editing of all ``BINARY`` or ``BLOB`` columns.
  1681. .. config:option:: $cfg['ShowFunctionFields']
  1682. :type: boolean
  1683. :default: true
  1684. Defines whether or not MySQL functions fields should be initially
  1685. displayed in edit/insert mode. Since version 2.10, the user can toggle
  1686. this setting from the interface.
  1687. .. config:option:: $cfg['ShowFieldTypesInDataEditView']
  1688. :type: boolean
  1689. :default: true
  1690. Defines whether or not type fields should be initially displayed in
  1691. edit/insert mode. The user can toggle this setting from the interface.
  1692. .. config:option:: $cfg['InsertRows']
  1693. :type: integer
  1694. :default: 2
  1695. Defines the default number of rows to be entered from the Insert page.
  1696. Users can manually change this from the bottom of that page to add or remove
  1697. blank rows.
  1698. .. config:option:: $cfg['ForeignKeyMaxLimit']
  1699. :type: integer
  1700. :default: 100
  1701. If there are fewer items than this in the set of foreign keys, then a
  1702. drop-down box of foreign keys is presented, in the style described by
  1703. the :config:option:`$cfg['ForeignKeyDropdownOrder']` setting.
  1704. .. config:option:: $cfg['ForeignKeyDropdownOrder']
  1705. :type: array
  1706. :default: array('content-id', 'id-content')
  1707. For the foreign key drop-down fields, there are several methods of
  1708. display, offering both the key and value data. The contents of the
  1709. array should be one or both of the following strings: ``content-id``,
  1710. ``id-content``.
  1711. Export and import settings
  1712. --------------------------
  1713. .. config:option:: $cfg['ZipDump']
  1714. :type: boolean
  1715. :default: true
  1716. .. config:option:: $cfg['GZipDump']
  1717. :type: boolean
  1718. :default: true
  1719. .. config:option:: $cfg['BZipDump']
  1720. :type: boolean
  1721. :default: true
  1722. Defines whether to allow the use of zip/GZip/BZip2 compression when
  1723. creating a dump file
  1724. .. config:option:: $cfg['CompressOnFly']
  1725. :type: boolean
  1726. :default: true
  1727. Defines whether to allow on the fly compression for GZip/BZip2
  1728. compressed exports. This doesn't affect smaller dumps and allows users
  1729. to create larger dumps that won't otherwise fit in memory due to php
  1730. memory limit. Produced files contain more GZip/BZip2 headers, but all
  1731. normal programs handle this correctly.
  1732. .. config:option:: $cfg['Export']
  1733. :type: array
  1734. :default: array(...)
  1735. In this array are defined default parameters for export, names of
  1736. items are similar to texts seen on export page, so you can easily
  1737. identify what they mean.
  1738. .. config:option:: $cfg['Export']['format']
  1739. :type: string
  1740. :default: ``'sql'``
  1741. Default export format.
  1742. .. config:option:: $cfg['Export']['method']
  1743. :type: string
  1744. :default: ``'quick'``
  1745. Defines how the export form is displayed when it loads. Valid values
  1746. are:
  1747. * ``quick`` to display the minimum number of options to configure
  1748. * ``custom`` to display every available option to configure
  1749. * ``custom-no-form`` same as ``custom`` but does not display the option
  1750. of using quick export
  1751. .. config:option:: $cfg['Export']['charset']
  1752. :type: string
  1753. :default: ``''``
  1754. Defines charset for generated export. By default no charset conversion is
  1755. done assuming UTF-8.
  1756. .. config:option:: $cfg['Export']['file_template_table']
  1757. :type: string
  1758. :default: ``'@TABLE@'``
  1759. Default filename template for table exports.
  1760. .. seealso:: :ref:`faq6_27`
  1761. .. config:option:: $cfg['Export']['file_template_database']
  1762. :type: string
  1763. :default: ``'@DATABASE@'``
  1764. Default filename template for database exports.
  1765. .. seealso:: :ref:`faq6_27`
  1766. .. config:option:: $cfg['Export']['file_template_server']
  1767. :type: string
  1768. :default: ``'@SERVER@'``
  1769. Default filename template for server exports.
  1770. .. seealso:: :ref:`faq6_27`
  1771. .. config:option:: $cfg['Import']
  1772. :type: array
  1773. :default: array(...)
  1774. In this array are defined default parameters for import, names of
  1775. items are similar to texts seen on import page, so you can easily
  1776. identify what they mean.
  1777. .. config:option:: $cfg['Import']['charset']
  1778. :type: string
  1779. :default: ``''``
  1780. Defines charset for import. By default no charset conversion is done
  1781. assuming UTF-8.
  1782. Tabs display settings
  1783. ---------------------
  1784. .. config:option:: $cfg['TabsMode']
  1785. :type: string
  1786. :default: ``'both'``
  1787. Defines whether the menu tabs contain ``'icons'``, ``'text'`` or ``'both'``.
  1788. .. config:option:: $cfg['PropertiesNumColumns']
  1789. :type: integer
  1790. :default: 1
  1791. How many columns will be utilized to display the tables on the database
  1792. property view? When setting this to a value larger than 1, the type of the
  1793. database will be omitted for more display space.
  1794. .. config:option:: $cfg['DefaultTabServer']
  1795. :type: string
  1796. :default: ``'welcome'``
  1797. Defines the tab displayed by default on server view. The possible values
  1798. are the localized equivalent of:
  1799. * ``welcome`` (recommended for multi-user setups)
  1800. * ``databases``,
  1801. * ``status``
  1802. * ``variables``
  1803. * ``privileges``
  1804. .. config:option:: $cfg['DefaultTabDatabase']
  1805. :type: string
  1806. :default: ``'structure'``
  1807. Defines the tab displayed by default on database view. The possible values
  1808. are the localized equivalent of:
  1809. * ``structure``
  1810. * ``sql``
  1811. * ``search``
  1812. * ``operations``
  1813. .. config:option:: $cfg['DefaultTabTable']
  1814. :type: string
  1815. :default: ``'browse'``
  1816. Defines the tab displayed by default on table view. The possible values
  1817. are the localized equivalent of:
  1818. * ``structure``
  1819. * ``sql``
  1820. * ``search``
  1821. * ``insert``
  1822. * ``browse``
  1823. PDF Options
  1824. -----------
  1825. .. config:option:: $cfg['PDFPageSizes']
  1826. :type: array
  1827. :default: ``array('A3', 'A4', 'A5', 'letter', 'legal')``
  1828. Array of possible paper sizes for creating PDF pages.
  1829. You should never need to change this.
  1830. .. config:option:: $cfg['PDFDefaultPageSize']
  1831. :type: string
  1832. :default: ``'A4'``
  1833. Default page size to use when creating PDF pages. Valid values are any
  1834. listed in :config:option:`$cfg['PDFPageSizes']`.
  1835. Languages
  1836. ---------
  1837. .. config:option:: $cfg['DefaultLang']
  1838. :type: string
  1839. :default: ``'en'``
  1840. Defines the default language to use, if not browser-defined or user-
  1841. defined. The corresponding language file needs to be in
  1842. locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
  1843. .. config:option:: $cfg['DefaultConnectionCollation']
  1844. :type: string
  1845. :default: ``'utf8mb4_general_ci'``
  1846. Defines the default connection collation to use, if not user-defined.
  1847. See the `MySQL documentation for charsets
  1848. <https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>`_
  1849. for list of possible values.
  1850. .. config:option:: $cfg['Lang']
  1851. :type: string
  1852. :default: not set
  1853. Force language to use. The corresponding language file needs to be in
  1854. locale/*code*/LC\_MESSAGES/phpmyadmin.mo.
  1855. .. config:option:: $cfg['FilterLanguages']
  1856. :type: string
  1857. :default: ``''``
  1858. Limit list of available languages to those matching the given regular
  1859. expression. For example if you want only Czech and English, you should
  1860. set filter to ``'^(cs|en)'``.
  1861. .. config:option:: $cfg['RecodingEngine']
  1862. :type: string
  1863. :default: ``'auto'``
  1864. You can select here which functions will be used for character set
  1865. conversion. Possible values are:
  1866. * auto - automatically use available one (first is tested iconv, then
  1867. recode)
  1868. * iconv - use iconv or libiconv functions
  1869. * recode - use recode\_string function
  1870. * mb - use :term:`mbstring` extension
  1871. * none - disable encoding conversion
  1872. Enabled charset conversion activates a pull-down menu in the Export
  1873. and Import pages, to choose the character set when exporting a file.
  1874. The default value in this menu comes from
  1875. :config:option:`$cfg['Export']['charset']` and :config:option:`$cfg['Import']['charset']`.
  1876. .. config:option:: $cfg['IconvExtraParams']
  1877. :type: string
  1878. :default: ``'//TRANSLIT'``
  1879. Specify some parameters for iconv used in charset conversion. See
  1880. `iconv documentation <https://www.gnu.org/savannah-checkouts/gnu/libiconv/documentati
  1881. on/libiconv-1.15/iconv_open.3.html>`_ for details. By default
  1882. ``//TRANSLIT`` is used, so that invalid characters will be
  1883. transliterated.
  1884. .. config:option:: $cfg['AvailableCharsets']
  1885. :type: array
  1886. :default: array(...)
  1887. Available character sets for MySQL conversion. You can add your own
  1888. (any of supported by recode/iconv) or remove these which you don't
  1889. use. Character sets will be shown in same order as here listed, so if
  1890. you frequently use some of these move them to the top.
  1891. Web server settings
  1892. -------------------
  1893. .. config:option:: $cfg['OBGzip']
  1894. :type: string/boolean
  1895. :default: ``'auto'``
  1896. Defines whether to use GZip output buffering for increased speed in
  1897. :term:`HTTP` transfers. Set to
  1898. true/false for enabling/disabling. When set to 'auto' (string),
  1899. phpMyAdmin tries to enable output buffering and will automatically
  1900. disable it if your browser has some problems with buffering. IE6 with
  1901. a certain patch is known to cause data corruption when having enabled
  1902. buffering.
  1903. .. config:option:: $cfg['TrustedProxies']
  1904. :type: array
  1905. :default: array()
  1906. Lists proxies and HTTP headers which are trusted for
  1907. :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`. This list is by
  1908. default empty, you need to fill in some trusted proxy servers if you
  1909. want to use rules for IP addresses behind proxy.
  1910. The following example specifies that phpMyAdmin should trust a
  1911. HTTP\_X\_FORWARDED\_FOR (``X-Forwarded-For``) header coming from the proxy
  1912. 1.2.3.4:
  1913. .. code-block:: php
  1914. $cfg['TrustedProxies'] = ['1.2.3.4' => 'HTTP_X_FORWARDED_FOR'];
  1915. The :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` directive uses the
  1916. client's IP address as usual.
  1917. .. config:option:: $cfg['GD2Available']
  1918. :type: string
  1919. :default: ``'auto'``
  1920. Specifies whether GD >= 2 is available. If yes it can be used for MIME
  1921. transformations. Possible values are:
  1922. * auto - automatically detect
  1923. * yes - GD 2 functions can be used
  1924. * no - GD 2 function cannot be used
  1925. .. config:option:: $cfg['CheckConfigurationPermissions']
  1926. :type: boolean
  1927. :default: true
  1928. We normally check the permissions on the configuration file to ensure
  1929. it's not world writable. However, phpMyAdmin could be installed on a
  1930. NTFS filesystem mounted on a non-Windows server, in which case the
  1931. permissions seems wrong but in fact cannot be detected. In this case a
  1932. sysadmin would set this parameter to ``false``.
  1933. .. config:option:: $cfg['LinkLengthLimit']
  1934. :type: integer
  1935. :default: 1000
  1936. Limit for length of :term:`URL` in links. When length would be above this
  1937. limit, it is replaced by form with button. This is required as some web
  1938. servers (:term:`IIS`) have problems with long :term:`URL` .
  1939. .. config:option:: $cfg['CSPAllow']
  1940. :type: string
  1941. :default: ``''``
  1942. Additional string to include in allowed script and image sources in Content
  1943. Security Policy header.
  1944. This can be useful when you want to include some external JavaScript files
  1945. in :file:`config.footer.inc.php` or :file:`config.header.inc.php`, which
  1946. would be normally not allowed by :term:`Content Security Policy`.
  1947. To allow some sites, just list them within the string:
  1948. .. code-block:: php
  1949. $cfg['CSPAllow'] = 'example.com example.net';
  1950. .. versionadded:: 4.0.4
  1951. .. config:option:: $cfg['DisableMultiTableMaintenance']
  1952. :type: boolean
  1953. :default: false
  1954. In the database Structure page, it's possible to mark some tables then
  1955. choose an operation like optimizing for many tables. This can slow
  1956. down a server; therefore, setting this to ``true`` prevents this kind
  1957. of multiple maintenance operation.
  1958. Theme settings
  1959. --------------
  1960. Please directly modify :file:`themes/themename/scss/_variables.scss`, although
  1961. your changes will be overwritten with the next update.
  1962. Design customization
  1963. --------------------
  1964. .. config:option:: $cfg['NavigationTreePointerEnable']
  1965. :type: boolean
  1966. :default: true
  1967. When set to true, hovering over an item in the navigation panel causes that item to be marked
  1968. (the background is highlighted).
  1969. .. config:option:: $cfg['BrowsePointerEnable']
  1970. :type: boolean
  1971. :default: true
  1972. When set to true, hovering over a row in the Browse page causes that row to be marked (the background
  1973. is highlighted).
  1974. .. config:option:: $cfg['BrowseMarkerEnable']
  1975. :type: boolean
  1976. :default: true
  1977. When set to true, a data row is marked (the background is highlighted) when the row is selected
  1978. with the checkbox.
  1979. .. config:option:: $cfg['LimitChars']
  1980. :type: integer
  1981. :default: 50
  1982. Maximum number of characters shown in any non-numeric field on browse
  1983. view. Can be turned off by a toggle button on the browse page.
  1984. .. config:option:: $cfg['RowActionLinks']
  1985. :type: string
  1986. :default: ``'left'``
  1987. Defines the place where table row links (Edit, Copy, Delete) would be
  1988. put when tables contents are displayed (you may have them displayed at
  1989. the left side, right side, both sides or nowhere).
  1990. .. config:option:: $cfg['RowActionLinksWithoutUnique']
  1991. :type: boolean
  1992. :default: false
  1993. Defines whether to show row links (Edit, Copy, Delete) and checkboxes
  1994. for multiple row operations even when the selection does not have a :term:`unique key`.
  1995. Using row actions in the absence of a unique key may result in different/more
  1996. rows being affected since there is no guaranteed way to select the exact row(s).
  1997. .. config:option:: $cfg['RememberSorting']
  1998. :type: boolean
  1999. :default: true
  2000. If enabled, remember the sorting of each table when browsing them.
  2001. .. config:option:: $cfg['TablePrimaryKeyOrder']
  2002. :type: string
  2003. :default: ``'NONE'``
  2004. This defines the default sort order for the tables, having a :term:`primary key`,
  2005. when there is no sort order defines externally.
  2006. Acceptable values : ['NONE', 'ASC', 'DESC']
  2007. .. config:option:: $cfg['ShowBrowseComments']
  2008. :type: boolean
  2009. :default: true
  2010. .. config:option:: $cfg['ShowPropertyComments']
  2011. :type: boolean
  2012. :default: true
  2013. By setting the corresponding variable to ``true`` you can enable the
  2014. display of column comments in Browse or Property display. In browse
  2015. mode, the comments are shown inside the header. In property mode,
  2016. comments are displayed using a CSS-formatted dashed-line below the
  2017. name of the column. The comment is shown as a tool-tip for that
  2018. column.
  2019. .. config:option:: $cfg['FirstDayOfCalendar']
  2020. :type: integer
  2021. :default: 0
  2022. This will define the first day of week in the calendar. The number
  2023. can be set from 0 to 6, which represents the seven days of the week,
  2024. Sunday to Saturday respectively. This value can also be configured by the user
  2025. in server settings -> features -> general -> First Day calendar field.
  2026. Text fields
  2027. -----------
  2028. .. config:option:: $cfg['CharEditing']
  2029. :type: string
  2030. :default: ``'input'``
  2031. Defines which type of editing controls should be used for CHAR and
  2032. VARCHAR columns. Applies to data editing and also to the default values
  2033. in structure editing. Possible values are:
  2034. * input - this allows to limit size of text to size of columns in MySQL,
  2035. but has problems with newlines in columns
  2036. * textarea - no problems with newlines in columns, but also no length
  2037. limitations
  2038. .. config:option:: $cfg['MinSizeForInputField']
  2039. :type: integer
  2040. :default: 4
  2041. Defines the minimum size for input fields generated for CHAR and
  2042. VARCHAR columns.
  2043. .. config:option:: $cfg['MaxSizeForInputField']
  2044. :type: integer
  2045. :default: 60
  2046. Defines the maximum size for input fields generated for CHAR and
  2047. VARCHAR columns.
  2048. .. config:option:: $cfg['TextareaCols']
  2049. :type: integer
  2050. :default: 40
  2051. .. config:option:: $cfg['TextareaRows']
  2052. :type: integer
  2053. :default: 15
  2054. .. config:option:: $cfg['CharTextareaCols']
  2055. :type: integer
  2056. :default: 40
  2057. .. config:option:: $cfg['CharTextareaRows']
  2058. :type: integer
  2059. :default: 7
  2060. Number of columns and rows for the textareas. This value will be
  2061. emphasized (\*2) for :term:`SQL` query
  2062. textareas and (\*1.25) for :term:`SQL`
  2063. textareas inside the query window.
  2064. The Char\* values are used for CHAR
  2065. and VARCHAR editing (if configured via :config:option:`$cfg['CharEditing']`).
  2066. .. versionchanged:: 5.0.0
  2067. The default value was changed from 2 to 7.
  2068. .. config:option:: $cfg['LongtextDoubleTextarea']
  2069. :type: boolean
  2070. :default: true
  2071. Defines whether textarea for LONGTEXT columns should have double size.
  2072. .. config:option:: $cfg['TextareaAutoSelect']
  2073. :type: boolean
  2074. :default: false
  2075. Defines if the whole textarea of the query box will be selected on
  2076. click.
  2077. .. config:option:: $cfg['EnableAutocompleteForTablesAndColumns']
  2078. :type: boolean
  2079. :default: true
  2080. Whether to enable autocomplete for table and column names in any
  2081. SQL query box.
  2082. SQL query box settings
  2083. ----------------------
  2084. .. config:option:: $cfg['SQLQuery']['Edit']
  2085. :type: boolean
  2086. :default: true
  2087. Whether to display an edit link to change a query in any SQL Query
  2088. box.
  2089. .. config:option:: $cfg['SQLQuery']['Explain']
  2090. :type: boolean
  2091. :default: true
  2092. Whether to display a link to explain a SELECT query in any SQL Query
  2093. box.
  2094. .. config:option:: $cfg['SQLQuery']['ShowAsPHP']
  2095. :type: boolean
  2096. :default: true
  2097. Whether to display a link to wrap a query in PHP code in any SQL Query
  2098. box.
  2099. .. config:option:: $cfg['SQLQuery']['Refresh']
  2100. :type: boolean
  2101. :default: true
  2102. Whether to display a link to refresh a query in any SQL Query box.
  2103. .. _web-dirs:
  2104. Web server upload/save/import directories
  2105. -----------------------------------------
  2106. If PHP is running in safe mode, all directories must be owned by the same user
  2107. as the owner of the phpMyAdmin scripts.
  2108. If the directory where phpMyAdmin is installed is subject to an
  2109. ``open_basedir`` restriction, you need to create a temporary directory in some
  2110. directory accessible by the PHP interpreter.
  2111. For security reasons, all directories should be outside the tree published by
  2112. webserver. If you cannot avoid having this directory published by webserver,
  2113. limit access to it either by web server configuration (for example using
  2114. .htaccess or web.config files) or place at least an empty :file:`index.html`
  2115. file there, so that directory listing is not possible. However as long as the
  2116. directory is accessible by web server, an attacker can guess filenames to download
  2117. the files.
  2118. .. config:option:: $cfg['UploadDir']
  2119. :type: string
  2120. :default: ``''``
  2121. The name of the directory where :term:`SQL` files have been uploaded by
  2122. other means than phpMyAdmin (for example, FTP). Those files are available
  2123. under a drop-down box when you click the database or table name, then the
  2124. Import tab.
  2125. If
  2126. you want different directory for each user, %u will be replaced with
  2127. username.
  2128. Please note that the file names must have the suffix ".sql"
  2129. (or ".sql.bz2" or ".sql.gz" if support for compressed formats is
  2130. enabled).
  2131. This feature is useful when your file is too big to be
  2132. uploaded via :term:`HTTP`, or when file
  2133. uploads are disabled in PHP.
  2134. .. warning::
  2135. Please see top of this chapter (:ref:`web-dirs`) for instructions how
  2136. to setup this directory and how to make its usage secure.
  2137. .. seealso::
  2138. See :ref:`faq1_16` for alternatives.
  2139. .. config:option:: $cfg['SaveDir']
  2140. :type: string
  2141. :default: ``''``
  2142. The name of the webserver directory where exported files can be saved.
  2143. If you want a different directory for each user, %u will be replaced with the
  2144. username.
  2145. Please note that the directory must exist and has to be writable for
  2146. the user running webserver.
  2147. .. warning::
  2148. Please see top of this chapter (:ref:`web-dirs`) for instructions how
  2149. to setup this directory and how to make its usage secure.
  2150. .. config:option:: $cfg['TempDir']
  2151. :type: string
  2152. :default: ``'./tmp/'``
  2153. The name of the directory where temporary files can be stored. It is used
  2154. for several purposes, currently:
  2155. * The templates cache which speeds up page loading.
  2156. * ESRI Shapefiles import, see :ref:`faq6_30`.
  2157. * To work around limitations of ``open_basedir`` for uploaded files, see
  2158. :ref:`faq1_11`.
  2159. This directory should have as strict permissions as possible as the only
  2160. user required to access this directory is the one who runs the webserver.
  2161. If you have root privileges, simply make this user owner of this directory
  2162. and make it accessible only by it:
  2163. .. code-block:: sh
  2164. chown www-data:www-data tmp
  2165. chmod 700 tmp
  2166. If you cannot change owner of the directory, you can achieve a similar
  2167. setup using :term:`ACL`:
  2168. .. code-block:: sh
  2169. chmod 700 tmp
  2170. setfacl -m "g:www-data:rwx" tmp
  2171. setfacl -d -m "g:www-data:rwx" tmp
  2172. If neither of above works for you, you can still make the directory
  2173. :command:`chmod 777`, but it might impose risk of other users on system
  2174. reading and writing data in this directory.
  2175. .. warning::
  2176. Please see top of this chapter (:ref:`web-dirs`) for instructions how
  2177. to setup this directory and how to make its usage secure.
  2178. Various display setting
  2179. -----------------------
  2180. .. config:option:: $cfg['RepeatCells']
  2181. :type: integer
  2182. :default: 100
  2183. Repeat the headers every X cells, or 0 to deactivate.
  2184. .. config:option:: $cfg['QueryHistoryDB']
  2185. :type: boolean
  2186. :default: false
  2187. .. config:option:: $cfg['QueryHistoryMax']
  2188. :type: integer
  2189. :default: 25
  2190. If :config:option:`$cfg['QueryHistoryDB']` is set to ``true``, all your
  2191. Queries are logged to a table, which has to be created by you (see
  2192. :config:option:`$cfg['Servers'][$i]['history']`). If set to false, all your
  2193. queries will be appended to the form, but only as long as your window is
  2194. opened they remain saved.
  2195. When using the JavaScript based query window, it will always get updated
  2196. when you click on a new table/db to browse and will focus if you click on
  2197. :guilabel:`Edit SQL` after using a query. You can suppress updating the
  2198. query window by checking the box :guilabel:`Do not overwrite this query
  2199. from outside the window` below the query textarea. Then you can browse
  2200. tables/databases in the background without losing the contents of the
  2201. textarea, so this is especially useful when composing a query with tables
  2202. you first have to look in. The checkbox will get automatically checked
  2203. whenever you change the contents of the textarea. Please uncheck the button
  2204. whenever you definitely want the query window to get updated even though
  2205. you have made alterations.
  2206. If :config:option:`$cfg['QueryHistoryDB']` is set to ``true`` you can
  2207. specify the amount of saved history items using
  2208. :config:option:`$cfg['QueryHistoryMax']`.
  2209. .. config:option:: $cfg['BrowseMIME']
  2210. :type: boolean
  2211. :default: true
  2212. Enable :ref:`transformations`.
  2213. .. config:option:: $cfg['MaxExactCount']
  2214. :type: integer
  2215. :default: 50000
  2216. For InnoDB tables, determines for how large tables phpMyAdmin should
  2217. get the exact row count using ``SELECT COUNT``. If the approximate row
  2218. count as returned by ``SHOW TABLE STATUS`` is smaller than this value,
  2219. ``SELECT COUNT`` will be used, otherwise the approximate count will be
  2220. used.
  2221. .. versionchanged:: 4.8.0
  2222. The default value was lowered to 50000 for performance reasons.
  2223. .. versionchanged:: 4.2.6
  2224. The default value was changed to 500000.
  2225. .. seealso:: :ref:`faq3_11`
  2226. .. config:option:: $cfg['MaxExactCountViews']
  2227. :type: integer
  2228. :default: 0
  2229. For VIEWs, since obtaining the exact count could have an impact on
  2230. performance, this value is the maximum to be displayed, using a
  2231. ``SELECT COUNT ... LIMIT``. Setting this to 0 bypasses any row
  2232. counting.
  2233. .. config:option:: $cfg['NaturalOrder']
  2234. :type: boolean
  2235. :default: true
  2236. Sorts database and table names according to natural order (for
  2237. example, t1, t2, t10). Currently implemented in the navigation panel
  2238. and in Database view, for the table list.
  2239. .. config:option:: $cfg['InitialSlidersState']
  2240. :type: string
  2241. :default: ``'closed'``
  2242. If set to ``'closed'``, the visual sliders are initially in a closed
  2243. state. A value of ``'open'`` does the reverse. To completely disable
  2244. all visual sliders, use ``'disabled'``.
  2245. .. config:option:: $cfg['UserprefsDisallow']
  2246. :type: array
  2247. :default: array()
  2248. Contains names of configuration options (keys in ``$cfg`` array) that
  2249. users can't set through user preferences. For possible values, refer
  2250. to classes under :file:`libraries/classes/Config/Forms/User/`.
  2251. .. config:option:: $cfg['UserprefsDeveloperTab']
  2252. :type: boolean
  2253. :default: false
  2254. Activates in the user preferences a tab containing options for
  2255. developers of phpMyAdmin.
  2256. Page titles
  2257. -----------
  2258. .. config:option:: $cfg['TitleTable']
  2259. :type: string
  2260. :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ / @TABLE@ | @PHPMYADMIN@'``
  2261. .. config:option:: $cfg['TitleDatabase']
  2262. :type: string
  2263. :default: ``'@HTTP_HOST@ / @VSERVER@ / @DATABASE@ | @PHPMYADMIN@'``
  2264. .. config:option:: $cfg['TitleServer']
  2265. :type: string
  2266. :default: ``'@HTTP_HOST@ / @VSERVER@ | @PHPMYADMIN@'``
  2267. .. config:option:: $cfg['TitleDefault']
  2268. :type: string
  2269. :default: ``'@HTTP_HOST@ | @PHPMYADMIN@'``
  2270. Allows you to specify window's title bar. You can use :ref:`faq6_27`.
  2271. Theme manager settings
  2272. ----------------------
  2273. .. config:option:: $cfg['ThemeManager']
  2274. :type: boolean
  2275. :default: true
  2276. Enables user-selectable themes. See :ref:`faqthemes`.
  2277. .. config:option:: $cfg['ThemeDefault']
  2278. :type: string
  2279. :default: ``'pmahomme'``
  2280. The default theme (a subdirectory under :file:`./themes/`).
  2281. .. config:option:: $cfg['ThemePerServer']
  2282. :type: boolean
  2283. :default: false
  2284. Whether to allow different theme for each server.
  2285. .. config:option:: $cfg['FontSize']
  2286. :type: string
  2287. :default: '82%'
  2288. .. deprecated:: 5.0.0
  2289. This setting was removed as the browser is more efficient,
  2290. thus no need of this option.
  2291. Font size to use, is applied in CSS.
  2292. Default queries
  2293. ---------------
  2294. .. config:option:: $cfg['DefaultQueryTable']
  2295. :type: string
  2296. :default: ``'SELECT * FROM @TABLE@ WHERE 1'``
  2297. .. config:option:: $cfg['DefaultQueryDatabase']
  2298. :type: string
  2299. :default: ``''``
  2300. Default queries that will be displayed in query boxes when user didn't
  2301. specify any. You can use standard :ref:`faq6_27`.
  2302. MySQL settings
  2303. --------------
  2304. .. config:option:: $cfg['DefaultFunctions']
  2305. :type: array
  2306. :default: ``array('FUNC_CHAR' => '', 'FUNC_DATE' => '', 'FUNC_NUMBER' => '', 'FUNC_SPATIAL' => 'GeomFromText', 'FUNC_UUID' => 'UUID', 'first_timestamp' => 'NOW')``
  2307. Functions selected by default when inserting/changing row, Functions
  2308. are defined for meta types as (``FUNC_NUMBER``, ``FUNC_DATE``, ``FUNC_CHAR``,
  2309. ``FUNC_SPATIAL``, ``FUNC_UUID``) and for ``first_timestamp``, which is used
  2310. for first timestamp column in table.
  2311. Example configuration
  2312. .. code-block:: php
  2313. $cfg['DefaultFunctions'] = [
  2314. 'FUNC_CHAR' => '',
  2315. 'FUNC_DATE' => '',
  2316. 'FUNC_NUMBER' => '',
  2317. 'FUNC_SPATIAL' => 'ST_GeomFromText',
  2318. 'FUNC_UUID' => 'UUID',
  2319. 'first_timestamp' => 'UTC_TIMESTAMP',
  2320. ];
  2321. Default options for Transformations
  2322. -----------------------------------
  2323. .. config:option:: $cfg['DefaultTransformations']
  2324. :type: array
  2325. :default: An array with below listed key-values
  2326. .. config:option:: $cfg['DefaultTransformations']['Substring']
  2327. :type: array
  2328. :default: array(0, 'all', '…')
  2329. .. config:option:: $cfg['DefaultTransformations']['Bool2Text']
  2330. :type: array
  2331. :default: array('T', 'F')
  2332. .. config:option:: $cfg['DefaultTransformations']['External']
  2333. :type: array
  2334. :default: array(0, '-f /dev/null -i -wrap -q', 1, 1)
  2335. .. config:option:: $cfg['DefaultTransformations']['PreApPend']
  2336. :type: array
  2337. :default: array('', '')
  2338. .. config:option:: $cfg['DefaultTransformations']['Hex']
  2339. :type: array
  2340. :default: array('2')
  2341. .. config:option:: $cfg['DefaultTransformations']['DateFormat']
  2342. :type: array
  2343. :default: array(0, '', 'local')
  2344. .. config:option:: $cfg['DefaultTransformations']['Inline']
  2345. :type: array
  2346. :default: array('100', 100)
  2347. .. config:option:: $cfg['DefaultTransformations']['TextImageLink']
  2348. :type: array
  2349. :default: array('', 100, 50)
  2350. .. config:option:: $cfg['DefaultTransformations']['TextLink']
  2351. :type: array
  2352. :default: array('', '', '')
  2353. Console settings
  2354. ----------------
  2355. .. note::
  2356. These settings are mostly meant to be changed by user.
  2357. .. config:option:: $cfg['Console']['StartHistory']
  2358. :type: boolean
  2359. :default: false
  2360. Show query history at start
  2361. .. config:option:: $cfg['Console']['AlwaysExpand']
  2362. :type: boolean
  2363. :default: false
  2364. Always expand query messages
  2365. .. config:option:: $cfg['Console']['CurrentQuery']
  2366. :type: boolean
  2367. :default: true
  2368. Show current browsing query
  2369. .. config:option:: $cfg['Console']['EnterExecutes']
  2370. :type: boolean
  2371. :default: false
  2372. Execute queries on Enter and insert new line with Shift+Enter
  2373. .. config:option:: $cfg['Console']['DarkTheme']
  2374. :type: boolean
  2375. :default: false
  2376. Switch to dark theme
  2377. .. config:option:: $cfg['Console']['Mode']
  2378. :type: string
  2379. :default: 'info'
  2380. Console mode
  2381. .. config:option:: $cfg['Console']['Height']
  2382. :type: integer
  2383. :default: 92
  2384. Console height
  2385. Developer
  2386. ---------
  2387. .. warning::
  2388. These settings might have huge effect on performance or security.
  2389. .. config:option:: $cfg['environment']
  2390. :type: string
  2391. :default: ``'production'``
  2392. Sets the working environment.
  2393. This only needs to be changed when you are developing phpMyAdmin itself.
  2394. The ``development`` mode may display debug information in some places.
  2395. Possible values are ``'production'`` or ``'development'``.
  2396. .. config:option:: $cfg['DBG']
  2397. :type: array
  2398. :default: []
  2399. .. config:option:: $cfg['DBG']['sql']
  2400. :type: boolean
  2401. :default: false
  2402. Enable logging queries and execution times to be
  2403. displayed in the console's Debug SQL tab.
  2404. .. config:option:: $cfg['DBG']['sqllog']
  2405. :type: boolean
  2406. :default: false
  2407. Enable logging of queries and execution times to the syslog.
  2408. Requires :config:option:`$cfg['DBG']['sql']` to be enabled.
  2409. .. config:option:: $cfg['DBG']['demo']
  2410. :type: boolean
  2411. :default: false
  2412. Enable to let server present itself as demo server.
  2413. This is used for `phpMyAdmin demo server <https://www.phpmyadmin.net/try/>`_.
  2414. It currently changes following behavior:
  2415. * There is welcome message on the main page.
  2416. * There is footer information about demo server and used git revision.
  2417. * The setup script is enabled even with existing configuration.
  2418. * The setup does not try to connect to the MySQL server.
  2419. .. config:option:: $cfg['DBG']['simple2fa']
  2420. :type: boolean
  2421. :default: false
  2422. Can be used for testing two-factor authentication using :ref:`simple2fa`.
  2423. .. _config-examples:
  2424. Examples
  2425. --------
  2426. See following configuration snippets for typical setups of phpMyAdmin.
  2427. Basic example
  2428. +++++++++++++
  2429. Example configuration file, which can be copied to :file:`config.inc.php` to
  2430. get some core configuration layout; it is distributed with phpMyAdmin as
  2431. :file:`config.sample.inc.php`. Please note that it does not contain all
  2432. configuration options, only the most frequently used ones.
  2433. .. literalinclude:: ../config.sample.inc.php
  2434. :language: php
  2435. .. warning::
  2436. Don't use the controluser 'pma' if it does not yet exist and don't use 'pmapass'
  2437. as password.
  2438. .. _example-signon:
  2439. Example for signon authentication
  2440. +++++++++++++++++++++++++++++++++
  2441. This example uses :file:`examples/signon.php` to demonstrate usage of :ref:`auth_signon`:
  2442. .. code-block:: php
  2443. <?php
  2444. $i = 0;
  2445. $i++;
  2446. $cfg['Servers'][$i]['auth_type'] = 'signon';
  2447. $cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
  2448. $cfg['Servers'][$i]['SignonURL'] = 'examples/signon.php';
  2449. Example for IP address limited autologin
  2450. ++++++++++++++++++++++++++++++++++++++++
  2451. If you want to automatically login when accessing phpMyAdmin locally while asking
  2452. for a password when accessing remotely, you can achieve it using following snippet:
  2453. .. code-block:: php
  2454. if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
  2455. $cfg['Servers'][$i]['auth_type'] = 'config';
  2456. $cfg['Servers'][$i]['user'] = 'root';
  2457. $cfg['Servers'][$i]['password'] = 'yourpassword';
  2458. } else {
  2459. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  2460. }
  2461. .. note::
  2462. Filtering based on IP addresses isn't reliable over the internet, use it
  2463. only for local address.
  2464. Example for using multiple MySQL servers
  2465. ++++++++++++++++++++++++++++++++++++++++
  2466. You can configure any number of servers using :config:option:`$cfg['Servers']`,
  2467. following example shows two of them:
  2468. .. code-block:: php
  2469. <?php
  2470. $cfg['blowfish_secret']='multiServerExample70518';
  2471. //any string of your choice
  2472. $i = 0;
  2473. $i++; // server 1 :
  2474. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  2475. $cfg['Servers'][$i]['verbose'] = 'no1';
  2476. $cfg['Servers'][$i]['host'] = 'localhost';
  2477. // more options for #1 ...
  2478. $i++; // server 2 :
  2479. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  2480. $cfg['Servers'][$i]['verbose'] = 'no2';
  2481. $cfg['Servers'][$i]['host'] = 'remote.host.addr';//or ip:'10.9.8.1'
  2482. // this server must allow remote clients, e.g., host 10.9.8.%
  2483. // not only in mysql.host but also in the startup configuration
  2484. // more options for #2 ...
  2485. // end of server sections
  2486. $cfg['ServerDefault'] = 0; // to choose the server on startup
  2487. // further general options ...
  2488. .. _example-google-ssl:
  2489. Google Cloud SQL with SSL
  2490. +++++++++++++++++++++++++
  2491. To connect to Google Could SQL, you currently need to disable certificate
  2492. verification. This is caused by the certificate being issued for CN matching
  2493. your instance name, but you connect to an IP address and PHP tries to match
  2494. these two. With verification you end up with error message like:
  2495. .. code-block:: text
  2496. Peer certificate CN=`api-project-851612429544:pmatest' did not match expected CN=`8.8.8.8'
  2497. .. warning::
  2498. With disabled verification your traffic is encrypted, but you're open to
  2499. man in the middle attacks.
  2500. To connect phpMyAdmin to Google Cloud SQL using SSL download the client and
  2501. server certificates and tell phpMyAdmin to use them:
  2502. .. code-block:: php
  2503. // IP address of your instance
  2504. $cfg['Servers'][$i]['host'] = '8.8.8.8';
  2505. // Use SSL for connection
  2506. $cfg['Servers'][$i]['ssl'] = true;
  2507. // Client secret key
  2508. $cfg['Servers'][$i]['ssl_key'] = '../client-key.pem';
  2509. // Client certificate
  2510. $cfg['Servers'][$i]['ssl_cert'] = '../client-cert.pem';
  2511. // Server certification authority
  2512. $cfg['Servers'][$i]['ssl_ca'] = '../server-ca.pem';
  2513. // Disable SSL verification (see above note)
  2514. $cfg['Servers'][$i]['ssl_verify'] = false;
  2515. .. seealso::
  2516. :ref:`ssl`,
  2517. :config:option:`$cfg['Servers'][$i]['ssl']`,
  2518. :config:option:`$cfg['Servers'][$i]['ssl_key']`,
  2519. :config:option:`$cfg['Servers'][$i]['ssl_cert']`,
  2520. :config:option:`$cfg['Servers'][$i]['ssl_ca']`,
  2521. :config:option:`$cfg['Servers'][$i]['ssl_verify']`,
  2522. <https://bugs.php.net/bug.php?id=72048>
  2523. reCaptcha using hCaptcha
  2524. ++++++++++++++++++++++++
  2525. .. code-block:: php
  2526. $cfg['CaptchaApi'] = 'https://www.hcaptcha.com/1/api.js';
  2527. $cfg['CaptchaCsp'] = 'https://hcaptcha.com https://*.hcaptcha.com';
  2528. $cfg['CaptchaRequestParam'] = 'h-captcha';
  2529. $cfg['CaptchaResponseParam'] = 'h-captcha-response';
  2530. $cfg['CaptchaSiteVerifyURL'] = 'https://hcaptcha.com/siteverify';
  2531. // This is the secret key from hCaptcha dashboard
  2532. $cfg['CaptchaLoginPrivateKey'] = '0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
  2533. // This is the site key from hCaptcha dashboard
  2534. $cfg['CaptchaLoginPublicKey'] = 'xxx-xxx-xxx-xxx-xxxx';
  2535. .. seealso:: `hCaptcha website <https://www.hcaptcha.com/>`_
  2536. .. seealso:: `hCaptcha Developer Guide <https://docs.hcaptcha.com/>`_