configuration — phpmyadmin 5.2.0 documentation-尊龙登录
all configurable data is placed in config.inc.php
in phpmyadmin’s
toplevel directory. if this file does not exist, please refer to the
installation section to create one. this file only needs to contain the
parameters you want to change from their corresponding default value in
libraries/config.default.php
(this file is not intended for changes).
see also
examples for examples of configurations
if a directive is missing from your file, you can just add another line with the file. this file is for over-writing the defaults; if you wish to use the default value there’s no need to add a line here.
the parameters which relate to design (like colors) are placed in
themes/themename/scss/_variables.scss
. you might also want to create
config.footer.inc.php
and config.header.inc.php
files to add
your site specific code to be included on start and end of each page.
note
some distributions (eg. debian or ubuntu) store config.inc.php
in
/etc/phpmyadmin
instead of within phpmyadmin sources.
basic settings¶
-
$cfg['pmaabsoluteuri']
¶ - type
string
- default value
''
changed in version 4.6.5: this setting was not available in phpmyadmin 4.6.0 - 4.6.4.
sets here the complete url (with full path) to your phpmyadmin installation’s directory. e.g.
https://www.example.net/path_to_your_phpmyadmin_directory/
. note also that the url on most of web servers are case sensitive (even on windows). don’t forget the trailing slash at the end.starting with version 2.3.0, it is advisable to try leaving this blank. in most cases phpmyadmin automatically detects the proper setting. users of port forwarding or complex reverse proxy setup might need to set this.
a good test is to browse a table, edit a row and save it. there should be an error message if phpmyadmin is having trouble auto–detecting the correct value. if you get an error that this must be set or if the autodetect code fails to detect your path, please post a bug report on our bug tracker so we can improve the code.
see also
1.40 when accessing phpmyadmin via an apache reverse proxy, cookie login does not work., 2.5 each time i want to insert or change a row or drop a database or a table, an error 404 (page not found) is displayed or, with http or cookie authentication, i’m asked to log in again. what’s wrong?, 4.7 authentication window is displayed more than once, why?, 5.16 with internet explorer, i get “access is denied” javascript errors. or i cannot make phpmyadmin work under windows.
-
$cfg['pmanorelation_disablewarning']
¶ - type
boolean
- default value
false
starting with version 2.3.0 phpmyadmin offers a lot of features to work with master / foreign – tables (see
$cfg['servers'][$i]['pmadb']
).if you tried to set this up and it does not work for you, have a look on the structure page of one database where you would like to use it. you will find a link that will analyze why those features have been disabled.
if you do not want to use those features set this variable to
true
to stop this message from appearing.
-
$cfg['authlog']
¶ - type
string
- default value
'auto'
new in version 4.8.0: this is supported since phpmyadmin 4.8.0.
configure authentication logging destination. failed (or all, depending on
$cfg['authlogsuccess']
) authentication attempts will be logged according to this directive:auto
let phpmyadmin automatically choose between
syslog
andphp
.syslog
log using syslog, using auth facility, on most systems this ends up in
/var/log/auth.log
.php
log into php error log.
sapi
log into php sapi logging.
/path/to/file
any other value is treated as a filename and log entries are written there.
note
when logging to a file, make sure its permissions are correctly set for a web server user, the setup should closely match instructions described in
$cfg['tempdir']
:
-
$cfg['authlogsuccess']
¶ - type
boolean
- default value
false
new in version 4.8.0: this is supported since phpmyadmin 4.8.0.
whether to log successful authentication attempts into
$cfg['authlog']
.
-
$cfg['suhosindisablewarning']
¶ - type
boolean
- default value
false
a warning is displayed on the main page if suhosin is detected.
you can set this parameter to
true
to stop this message from appearing.
- type
boolean
- default value
false
a warning is displayed on the main page if the php parameter session.gc_maxlifetime is lower than cookie validity configured in phpmyadmin.
you can set this parameter to
true
to stop this message from appearing.
-
$cfg['serverlibrarydifference_disablewarning']
¶ - type
boolean
- default value
false
deprecated since version 4.7.0: this setting was removed as the warning has been removed as well.
a warning is displayed on the main page if there is a difference between the mysql library and server version.
you can set this parameter to
true
to stop this message from appearing.
-
$cfg['reservedworddisablewarning']
¶ - type
boolean
- default value
false
this warning is displayed on the structure page of a table if one or more column names match with words which are mysql reserved.
if you want to turn off this warning, you can set it to
true
and warning will no longer be displayed.
-
$cfg['translationwarningthreshold']
¶ - type
integer
- default value
80
show warning about incomplete translations on certain threshold.
-
$cfg['senderrorreports']
¶ - type
string
- default value
'ask'
valid values are:
ask
always
never
sets the default behavior for javascript error reporting.
whenever an error is detected in the javascript execution, an error report may be sent to the phpmyadmin team if the user agrees.
the default setting of
'ask'
will ask the user everytime there is a new error report. however you can set this parameter to'always'
to send error reports without asking for confirmation or you can set it to'never'
to never send error reports.this directive is available both in the configuration file and in users preferences. if the person in charge of a multi-user installation prefers to disable this feature for all users, a value of
'never'
should be set, and the$cfg['userprefsdisallow']
directive should contain'senderrorreports'
in one of its array values.
-
$cfg['consoleenterexecutes']
¶ - type
boolean
- default value
false
setting this to
true
allows the user to execute queries by pressing enter instead of ctrl enter. a new line can be inserted by pressing shift enter.the behaviour of the console can be temporarily changed using console’s settings interface.
-
$cfg['allowthirdpartyframing']
¶ - type
boolean|string
- default value
false
setting this to
true
allows phpmyadmin to be included inside a frame, and is a potential security hole allowing cross-frame scripting attacks or clickjacking. setting this to ‘sameorigin’ prevents phpmyadmin to be included from another document in a frame, unless that document belongs to the same domain.
server connection settings¶
-
$cfg['servers']
¶ - type
array
- default value
one server array with settings listed below
since version 1.4.2, phpmyadmin supports the administration of multiple mysql servers. therefore, a
$cfg['servers']
-array has been added which contains the login information for the different servers. the first$cfg['servers'][$i]['host']
contains the hostname of the first server, the second$cfg['servers'][$i]['host']
the hostname of the second server, etc. inlibraries/config.default.php
, there is only one section for server definition, however you can put as many as you need inconfig.inc.php
, copy that block or needed parts (you don’t have to define all settings, just those you need to change).note
the
$cfg['servers']
array starts with $cfg[‘servers’][1]. do not use $cfg[‘servers’][0]. if you want more than one server, just copy following section (including $i increment) several times. there is no need to define full server array, just define values you need to change.
-
$cfg['servers'][$i]['host']
¶ - type
string
- default value
'localhost'
the hostname or ip address of your $i-th mysql-server. e.g.
localhost
.possible values are:
hostname, e.g.,
'localhost'
or'mydb.example.org'
ip address, e.g.,
'127.0.0.1'
or'192.168.10.1'
ipv6 address, e.g.
2001:cdba:0000:0000:0000:0000:3257:9652
dot -
'.'
, i.e., use named pipes on windows systemsempty -
''
, disables this server
note
the hostname
localhost
is handled specially by mysql and it uses the socket based connection protocol. to use tcp/ip networking, use an ip address or hostname such as127.0.0.1
ordb.example.com
. you can configure the path to the socket with$cfg['servers'][$i]['socket']
.see also
-
$cfg['servers'][$i]['port']
¶ - type
string
- default value
''
the port-number of your $i-th mysql-server. default is 3306 (leave blank).
note
if you use
localhost
as the hostname, mysql ignores this port number and connects with the socket, so if you want to connect to a port different from the default port, use127.0.0.1
or the real hostname in$cfg['servers'][$i]['host']
.see also
-
$cfg['servers'][$i]['socket']
¶ - type
string
- default value
''
the path to the socket to use. leave blank for default. to determine the correct socket, check your mysql configuration or, using the mysql command–line client, issue the
status
command. among the resulting information displayed will be the socket used.note
this takes effect only if
$cfg['servers'][$i]['host']
is set tolocalhost
.see also
-
$cfg['servers'][$i]['ssl']
¶ - type
boolean
- default value
false
whether to enable ssl for the connection between phpmyadmin and the mysql server to secure the connection.
when using the
'mysql'
extension, none of the remaining'ssl...'
configuration options apply.we strongly recommend the
'mysqli'
extension when using this option.see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_key']
¶ - type
string
- default value
null
path to the client key file when using ssl for connecting to the mysql server. this is used to authenticate the client to the server.
for example:
$cfg['servers'][$i]['ssl_key'] = '/etc/mysql/server-key.pem';
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_cert']
¶ - type
string
- default value
null
path to the client certificate file when using ssl for connecting to the mysql server. this is used to authenticate the client to the server.
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_ca']
¶ - type
string
- default value
null
path to the ca file when using ssl for connecting to the mysql server.
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_ca_path']
¶ - type
string
- default value
null
directory containing trusted ssl ca certificates in pem format.
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_ciphers']
¶ - type
string
- default value
null
list of allowable ciphers for ssl connections to the mysql server.
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['ssl_verify']
¶ - type
boolean
- default value
true
new in version 4.6.0: this is supported since phpmyadmin 4.6.0.
if your php install uses the mysql native driver (mysqlnd), your mysql server is 5.6 or later, and your ssl certificate is self-signed, there is a chance your ssl connection will fail due to validation. setting this to
false
will disable the validation check.since php 5.6.0 it also verifies whether server name matches cn of its certificate. there is currently no way to disable just this check without disabling complete ssl verification.
warning
disabling the certificate verification defeats purpose of using ssl. this will make the connection vulnerable to man in the middle attacks.
note
this flag only works with php 5.6.16 or later.
see also
using ssl for connection to database server, google cloud sql with ssl, amazon rds aurora with ssl,
$cfg['servers'][$i]['ssl']
,$cfg['servers'][$i]['ssl_key']
,$cfg['servers'][$i]['ssl_cert']
,$cfg['servers'][$i]['ssl_ca']
,$cfg['servers'][$i]['ssl_ca_path']
,$cfg['servers'][$i]['ssl_ciphers']
,$cfg['servers'][$i]['ssl_verify']
-
$cfg['servers'][$i]['connect_type']
¶ - type
string
- default value
'tcp'
deprecated since version 4.7.0: this setting is no longer used as of 4.7.0, since mysql decides the connection type based on host, so it could lead to unexpected results. please set
$cfg['servers'][$i]['host']
accordingly instead.what type connection to use with the mysql server. your options are
'socket'
and'tcp'
. it defaults to tcp as that is nearly guaranteed to be available on all mysql servers, while sockets are not supported on some platforms. to use the socket mode, your mysql server must be on the same machine as the web server.
-
$cfg['servers'][$i]['compress']
¶ - type
boolean
- default value
false
whether to use a compressed protocol for the mysql server connection or not (experimental).
-
$cfg['servers'][$i]['controlhost']
¶ - type
string
- default value
''
permits to use an alternate host to hold the configuration storage data.
see also
-
$cfg['servers'][$i]['controlport']
¶ - type
string
- default value
''
permits to use an alternate port to connect to the host that holds the configuration storage.
see also
-
$cfg['servers'][$i]['controluser']
¶ - type
string
- default value
''
-
$cfg['servers'][$i]['controlpass']
¶ - type
string
- default value
''
this special account is used to access phpmyadmin configuration storage. you don’t need it in single user case, but if phpmyadmin is shared it is recommended to give access to phpmyadmin configuration storage only to this user and configure phpmyadmin to use it. all users will then be able to use the features without need to have direct access to phpmyadmin configuration storage.
changed in version 2.2.5: those were called
stduser
andstdpass
-
$cfg['servers'][$i]['control_*']
¶ - type
mixed
new in version 4.7.0.
you can change any mysql connection setting for control link (used to access phpmyadmin configuration storage) using configuration prefixed with
control_
.this can be used to change any aspect of the control connection, which by default uses same parameters as the user one.
for example you can configure ssl for the control connection:
// enable ssl $cfg['servers'][$i]['control_ssl'] = true; // client secret key $cfg['servers'][$i]['control_ssl_key'] = '../client-key.pem'; // client certificate $cfg['servers'][$i]['control_ssl_cert'] = '../client-cert.pem'; // server certification authority $cfg['servers'][$i]['control_ssl_ca'] = '../server-ca.pem';
-
$cfg['servers'][$i]['auth_type']
¶ - type
string
- default value
'cookie'
whether config or cookie or http or signon authentication should be used for this server.
‘config’ authentication (
$auth_type = 'config'
) is the plain old way: username and password are stored inconfig.inc.php
.‘cookie’ authentication mode (
$auth_type = 'cookie'
) allows you to log in as any valid mysql user with the help of cookies.‘http’ authentication allows you to log in as any valid mysql user via http-auth.
‘signon’ authentication mode (
$auth_type = 'signon'
) allows you to log in from prepared php session data or using supplied php script.
see also
-
$cfg['servers'][$i]['auth_http_realm']
¶ - type
string
- default value
''
when using auth_type =
http
, this field allows to define a custom http basic auth realm which will be displayed to the user. if not explicitly specified in your configuration, a string combined of “phpmyadmin ” and either$cfg['servers'][$i]['verbose']
or$cfg['servers'][$i]['host']
will be used.
-
$cfg['servers'][$i]['auth_swekey_config']
¶ - type
string
- default value
''
new in version 3.0.0.0: this setting was named $cfg[‘servers’][$i][‘auth_feebee_config’] and was renamed before the 3.0.0.0 release.
deprecated since version 4.6.4: this setting was removed because their servers are no longer working and it was not working correctly.
deprecated since version 4.0.10.17: this setting was removed in a maintenance release because their servers are no longer working and it was not working correctly.
the name of the file containing swekey ids and login names for hardware authentication. leave empty to deactivate this feature.
-
$cfg['servers'][$i]['user']
¶ - type
string
- default value
'root'
-
$cfg['servers'][$i]['password']
¶ - type
string
- default value
''
when using
$cfg['servers'][$i]['auth_type']
set to ‘config’, this is the user/password-pair which phpmyadmin will use to connect to the mysql server. this user/password pair is not needed when http or cookie authentication is used and should be empty.
-
$cfg['servers'][$i]['nopassword']
¶ - type
boolean
- default value
false
deprecated since version 4.7.0: this setting was removed as it can produce unexpected results.
allow attempt to log in without password when a login with password fails. this can be used together with http authentication, when authentication is done some other way and phpmyadmin gets user name from auth and uses empty password for connecting to mysql. password login is still tried first, but as fallback, no password method is tried.
-
$cfg['servers'][$i]['only_db']
¶ - type
string or array
- default value
''
if set to a (an array of) database name(s), only this (these) database(s) will be shown to the user. since phpmyadmin 2.2.1, this/these database(s) name(s) may contain mysql wildcards characters (“_” and “%”): if you want to use literal instances of these characters, escape them (i.e. use
'my\_db'
and not'my_db'
).this setting is an efficient way to lower the server load since the latter does not need to send mysql requests to build the available database list. but it does not replace the privileges rules of the mysql database server. if set, it just means only these databases will be displayed but not that all other databases can’t be used.
an example of using more that one database:
$cfg['servers'][$i]['only_db'] = ['db1', 'db2'];
changed in version 4.0.0: previous versions permitted to specify the display order of the database names via this directive.
-
$cfg['servers'][$i]['hide_db']
¶ - type
string
- default value
''
regular expression for hiding some databases from unprivileged users. this only hides them from listing, but a user is still able to access them (using, for example, the sql query area). to limit access, use the mysql privilege system. for example, to hide all databases starting with the letter “a”, use
$cfg['servers'][$i]['hide_db'] = '^a';
and to hide both “db1” and “db2” use
$cfg['servers'][$i]['hide_db'] = '^(db1|db2)$';
more information on regular expressions can be found in the portion of the php reference manual.
-
$cfg['servers'][$i]['verbose']
¶ - type
string
- default value
''
only useful when using phpmyadmin with multiple server entries. if set, this string will be displayed instead of the hostname in the pull-down menu on the main page. this can be useful if you want to show only certain databases on your system, for example. for http auth, all non-us-ascii characters will be stripped.
-
$cfg['servers'][$i]['extension']
¶ - type
string
- default value
'mysqli'
deprecated since version 4.2.0: this setting was removed. the
mysql
extension will only be used when themysqli
extension is not available. as of 5.0.0, only themysqli
extension can be used.the php mysql extension to use (
mysql
ormysqli
).it is recommended to use
mysqli
in all installations.
-
$cfg['servers'][$i]['pmadb']
¶ - type
string
- default value
''
the name of the database containing the phpmyadmin configuration storage.
see the phpmyadmin configuration storage section in this document to see the benefits of this feature, and for a quick way of creating this database and the needed tables.
if you are the only user of this phpmyadmin installation, you can use your current database to store those special tables; in this case, just put your current database name in
$cfg['servers'][$i]['pmadb']
. for a multi-user installation, set this parameter to the name of your central database containing the phpmyadmin configuration storage.
-
$cfg['servers'][$i]['bookmarktable']
¶ - type
string or false
- default value
''
new in version 2.2.0.
since release 2.2.0 phpmyadmin allows users to bookmark queries. this can be useful for queries you often run. to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageenter the table name in
$cfg['servers'][$i]['bookmarktable']
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['relation']
¶ - type
string or false
- default value
''
new in version 2.2.4.
since release 2.2.4 you can describe, in a special ‘relation’ table, which column is a key in another table (a foreign key). phpmyadmin currently uses this to:
make clickable, when you browse the master table, the data values that point to the foreign table;
display in an optional tool-tip the “display column” when browsing the master table, if you move the mouse to a column containing a foreign key (use also the ‘table_info’ table); (see 6.7 how can i use the “display column” feature?)
in edit/insert mode, display a drop-down list of possible foreign keys (key value and “display column” are shown) (see 6.21 in edit/insert mode, how can i see a list of possible values for a column, based on some foreign table?)
display links on the table properties page, to check referential integrity (display missing foreign keys) for each described key;
in query-by-example, create automatic joins (see 6.6 how can i use the relation table in query-by-example?)
enable you to get a pdf schema of your database (also uses the table_coords table).
the keys can be numeric or character.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the relation table name in
$cfg['servers'][$i]['relation']
now as normal user open phpmyadmin and for each one of your tables where you want to use this feature, click structure/relation view/ and choose foreign columns.
this feature can be disabled by setting the configuration to
false
.note
in the current version,
master_db
must be the same asforeign_db
. those columns have been put in future development of the cross-db relations.
-
$cfg['servers'][$i]['table_info']
¶ - type
string or false
- default value
''
new in version 2.3.0.
since release 2.3.0 you can describe, in a special ‘table_info’ table, which column is to be displayed as a tool-tip when moving the cursor over the corresponding key. this configuration variable will hold the name of this special table. to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['table_info']
(e.g.pma__table_info
)then for each table where you want to use this feature, click “structure/relation view/choose column to display” to choose the column.
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['table_coords']
¶ - type
string or false
- default value
''
the designer feature can save your page layout; by pressing the “save page” or “save page as” button in the expanding designer menu, you can customize the layout and have it loaded the next time you use the designer. that layout is stored in this table. furthermore, this table is also required for using the pdf relation export feature, see
$cfg['servers'][$i]['pdf_pages']
for additional details.
-
$cfg['servers'][$i]['pdf_pages']
¶ - type
string or false
- default value
''
new in version 2.3.0.
since release 2.3.0 you can have phpmyadmin create pdf pages showing the relations between your tables. further, the designer interface permits visually managing the relations. to do this it needs two tables “pdf_pages” (storing information about the available pdf pages) and “table_coords” (storing coordinates where each table will be placed on a pdf schema output). you must be using the “relation” feature.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the correct table names in
$cfg['servers'][$i]['table_coords']
and$cfg['servers'][$i]['pdf_pages']
this feature can be disabled by setting either of the configurations to
false
.
-
$cfg['servers'][$i]['designer_coords']
¶ - type
string
- default value
''
new in version 2.10.0: since release 2.10.0 a designer interface is available; it permits to visually manage the relations.
deprecated since version 4.3.0: this setting was removed and the designer table positioning data is now stored into
$cfg['servers'][$i]['table_coords']
.note
you can now delete the table pma__designer_coords from your phpmyadmin configuration storage database and remove
$cfg['servers'][$i]['designer_coords']
from your configuration file.
-
$cfg['servers'][$i]['column_info']
¶ - type
string or false
- default value
''
new in version 2.3.0.
this part requires a content update! since release 2.3.0 you can store comments to describe each column for each table. these will then be shown on the “printview”.
starting with release 2.5.0, comments are consequently used on the table property pages and table browse view, showing up as tool-tips above the column name (properties page) or embedded within the header of table in browse view. they can also be shown in a table dump. please see the relevant configuration directives later on.
also new in release 2.5.0 is a mime- transformation system which is also based on the following table structure. see transformations for further information. to use the mime- transformation system, your column_info table has to have the three new columns ‘mimetype’, ‘transformation’, ‘transformation_options’.
starting with release 4.3.0, a new input-oriented transformation system has been introduced. also, backward compatibility code used in the old transformations system was removed. as a result, an update to column_info table is necessary for previous transformations and the new input-oriented transformation system to work. phpmyadmin will upgrade it automatically for you by analyzing your current column_info table structure. however, if something goes wrong with the auto-upgrade then you can use the sql script found in
./sql/upgrade_column_info_4_3_0 .sql
to upgrade it manually.to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['column_info']
(e.g.pma__column_info
)to update your pre-2.5.0 column_comments table use this: and remember that the variable in
config.inc.php
has been renamed from$cfg['servers'][$i]['column_comments']
to$cfg['servers'][$i]['column_info']
alter table `pma__column_comments` add `mimetype` varchar( 255 ) not null, add `transformation` varchar( 255 ) not null, add `transformation_options` varchar( 255 ) not null;
to update your pre-4.3.0 column_info table manually use this
./sql/upgrade_column_info_4_3_0 .sql
sql script.
this feature can be disabled by setting the configuration to
false
.note
for auto-upgrade functionality to work, your
$cfg['servers'][$i]['controluser']
must have alter privilege onphpmyadmin
database. see the on how togrant
privileges to a user.
-
$cfg['servers'][$i]['history']
¶ - type
string or false
- default value
''
new in version 2.5.0.
since release 2.5.0 you can store your sql history, which means all queries you entered manually into the phpmyadmin interface. if you don’t want to use a table-based history, you can use the javascript-based history.
using that, all your history items are deleted when closing the window. using
$cfg['queryhistorymax']
you can specify an amount of history items you want to have on hold. on every login, this list gets cut to the maximum amount.the query history is only available if javascript is enabled in your browser.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['history']
(e.g.pma__history
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['recent']
¶ - type
string or false
- default value
''
new in version 3.5.0.
since release 3.5.0 you can show recently used tables in the navigation panel. it helps you to jump across table directly, without the need to select the database, and then select the table. using
$cfg['numrecenttables']
you can configure the maximum number of recent tables shown. when you select a table from the list, it will jump to the page specified in$cfg['navigationtreedefaulttabtable']
.without configuring the storage, you can still access the recently used tables, but it will disappear after you logout.
to allow the usage of this functionality persistently:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['recent']
(e.g.pma__recent
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['favorite']
¶ - type
string or false
- default value
''
new in version 4.2.0.
since release 4.2.0 you can show a list of selected tables in the navigation panel. it helps you to jump to the table directly, without the need to select the database, and then select the table. when you select a table from the list, it will jump to the page specified in
$cfg['navigationtreedefaulttabtable']
.you can add tables to this list or remove tables from it in database structure page by clicking on the star icons next to table names. using
$cfg['numfavoritetables']
you can configure the maximum number of favorite tables shown.without configuring the storage, you can still access the favorite tables, but it will disappear after you logout.
to allow the usage of this functionality persistently:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['favorite']
(e.g.pma__favorite
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['table_uiprefs']
¶ - type
string or false
- default value
''
new in version 3.5.0.
since release 3.5.0 phpmyadmin can be configured to remember several things (sorted column
$cfg['remembersorting']
, column order, and column visibility from a database table) for browsing tables. without configuring the storage, these features still can be used, but the values will disappear after you logout.to allow the usage of these functionality persistently:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['table_uiprefs']
(e.g.pma__table_uiprefs
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['users']
¶ - type
string or false
- default value
''
the table used by phpmyadmin to store user name information for associating with user groups. see the next entry on
$cfg['servers'][$i]['usergroups']
for more details and the suggested settings.
-
$cfg['servers'][$i]['usergroups']
¶ - type
string or false
- default value
''
new in version 4.1.0.
since release 4.1.0 you can create different user groups with menu items attached to them. users can be assigned to these groups and the logged in user would only see menu items configured to the usergroup they are assigned to. to do this it needs two tables “usergroups” (storing allowed menu items for each user group) and “users” (storing users and their assignments to user groups).
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the correct table names in
$cfg['servers'][$i]['users']
(e.g.pma__users
) and$cfg['servers'][$i]['usergroups']
(e.g.pma__usergroups
)
this feature can be disabled by setting either of the configurations to
false
.see also
- type
string or false
- default value
''
new in version 4.1.0.
since release 4.1.0 you can hide/show items in the navigation tree.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['navigationhiding']
(e.g.pma__navigationhiding
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['central_columns']
¶ - type
string or false
- default value
''
new in version 4.3.0.
since release 4.3.0 you can have a central list of columns per database. you can add/remove columns to the list as per your requirement. these columns in the central list will be available to use while you create a new column for a table or create a table itself. you can select a column from central list while creating a new column, it will save you from writing the same column definition over again or from writing different names for similar column.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['central_columns']
(e.g.pma__central_columns
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['designer_settings']
¶ - type
string or false
- default value
''
new in version 4.5.0.
since release 4.5.0 your designer settings can be remembered. your choice regarding ‘angular/direct links’, ‘snap to grid’, ‘toggle relation lines’, ‘small/big all’, ‘move menu’ and ‘pin text’ can be remembered persistently.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['designer_settings']
(e.g.pma__designer_settings
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['savedsearches']
¶ - type
string or false
- default value
''
new in version 4.2.0.
since release 4.2.0 you can save and load query-by-example searches from the database > query panel.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['savedsearches']
(e.g.pma__savedsearches
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['export_templates']
¶ - type
string or false
- default value
''
new in version 4.5.0.
since release 4.5.0 you can save and load export templates.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['export_templates']
(e.g.pma__export_templates
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['tracking']
¶ - type
string or false
- default value
''
new in version 3.3.x.
since release 3.3.x a tracking mechanism is available. it helps you to track every sql command which is executed by phpmyadmin. the mechanism supports logging of data manipulation and data definition statements. after enabling it you can create versions of tables.
the creation of a version has two effects:
phpmyadmin saves a snapshot of the table, including structure and indexes.
phpmyadmin logs all commands which change the structure and/or data of the table and links these commands with the version number.
of course you can view the tracked changes. on the tracking page a complete report is available for every version. for the report you can use filters, for example you can get a list of statements within a date range. when you want to filter usernames you can enter * for all names or you enter a list of names separated by ‘,’. in addition you can export the (filtered) report to a file or to a temporary database.
to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['tracking']
(e.g.pma__tracking
)
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['tracking_version_auto_create']
¶ - type
boolean
- default value
false
whether the tracking mechanism creates versions for tables and views automatically.
if this is set to true and you create a table or view with
create table …
create view …
and no version exists for it, the mechanism will create a version for you automatically.
-
$cfg['servers'][$i]['tracking_default_statements']
¶ - type
string
- default value
'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'
defines the list of statements the auto-creation uses for new versions.
-
$cfg['servers'][$i]['tracking_add_drop_view']
¶ - type
boolean
- default value
true
whether a drop view if exists statement will be added as first line to the log when creating a view.
-
$cfg['servers'][$i]['tracking_add_drop_table']
¶ - type
boolean
- default value
true
whether a drop table if exists statement will be added as first line to the log when creating a table.
-
$cfg['servers'][$i]['tracking_add_drop_database']
¶ - type
boolean
- default value
true
whether a drop database if exists statement will be added as first line to the log when creating a database.
-
$cfg['servers'][$i]['userconfig']
¶ - type
string or false
- default value
''
new in version 3.4.x.
since release 3.4.x phpmyadmin allows users to set most preferences by themselves and store them in the database.
if you don’t allow for storing preferences in
$cfg['servers'][$i]['pmadb']
, users can still personalize phpmyadmin, but settings will be saved in browser’s local storage, or, it is is unavailable, until the end of session.to allow the usage of this functionality:
set up
$cfg['servers'][$i]['pmadb']
and the phpmyadmin configuration storageput the table name in
$cfg['servers'][$i]['userconfig']
this feature can be disabled by setting the configuration to
false
.
-
$cfg['servers'][$i]['maxtableuiprefs']
¶ - type
integer
- default value
100
maximum number of rows saved in
$cfg['servers'][$i]['table_uiprefs']
table.when tables are dropped or renamed,
$cfg['servers'][$i]['table_uiprefs']
may contain invalid data (referring to tables which no longer exist). we only keep this number of newest rows in$cfg['servers'][$i]['table_uiprefs']
and automatically delete older rows.
-
$cfg['servers'][$i]['sessiontimezone']
¶ - type
string
- default value
''
sets the time zone used by phpmyadmin. leave blank to use the time zone of your database server. possible values are explained at
this is useful when your database server uses a time zone which is different from the time zone you want to use in phpmyadmin.
-
$cfg['servers'][$i]['allowroot']
¶ - type
boolean
- default value
true
whether to allow root access. this is just a shortcut for the
$cfg['servers'][$i]['allowdeny']['rules']
below.
-
$cfg['servers'][$i]['allownopassword']
¶ - type
boolean
- default value
false
whether to allow logins without a password. the default value of
false
for this parameter prevents unintended access to a mysql server with was left with an empty password for root or on which an anonymous (blank) user is defined.
-
$cfg['servers'][$i]['allowdeny']['order']
¶ - type
string
- default value
''
if your rule order is empty, then ip authorization is disabled.
if your rule order is set to
'deny,allow'
then the system applies all deny rules followed by allow rules. access is allowed by default. any client which does not match a deny command or does match an allow command will be allowed access to the server.if your rule order is set to
'allow,deny'
then the system applies all allow rules followed by deny rules. access is denied by default. any client which does not match an allow directive or does match a deny directive will be denied access to the server.if your rule order is set to
'explicit'
, authorization is performed in a similar fashion to rule order ‘deny,allow’, with the added restriction that your host/username combination must be listed in the allow rules, and not listed in the deny rules. this is the most secure means of using allow/deny rules, and was available in apache by specifying allow and deny rules without setting any order.please also see
$cfg['trustedproxies']
for detecting ip address behind proxies.
-
$cfg['servers'][$i]['allowdeny']['rules']
¶ - type
array of strings
- default value
array()
the general format for the rules is as such:
<'allow' | 'deny'>
[from] if you wish to match all users, it is possible to use a
'%'
as a wildcard in the username field.there are a few shortcuts you can use in the ipmask field as well (please note that those containing server_address might not be available on all webservers):
'all' -> 0.0.0.0/0 'localhost' -> 127.0.0.1/8 'localneta' -> server_address/8 'localnetb' -> server_address/16 'localnetc' -> server_address/24
having an empty rule list is equivalent to either using
'allow % from all'
if your rule order is set to'deny,allow'
or'deny % from all'
if your rule order is set to'allow,deny'
or'explicit'
.for the ip address matching system, the following work:
xxx.xxx.xxx.xxx
(an exact ip address)xxx.xxx.xxx.[yyy-zzz]
(an ip address range)xxx.xxx.xxx.xxx/nn
(cidr, classless inter-domain routing type ip addresses)
but the following does not work:
xxx.xxx.xxx.xx[yyy-zzz]
(partial ip address range)
for ipv6 addresses, the following work:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
(an exact ipv6 address)xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz]
(an ipv6 address range)xxxx:xxxx:xxxx:xxxx/nn
(cidr, classless inter-domain routing type ipv6 addresses)
but the following does not work:
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz]
(partial ipv6 address range)
examples:
$cfg['servers'][$i]['allowdeny']['order'] = 'allow,deny'; $cfg['servers'][$i]['allowdeny']['rules'] = ['allow bob from all']; // allow only 'bob' to connect from any host $cfg['servers'][$i]['allowdeny']['order'] = 'allow,deny'; $cfg['servers'][$i]['allowdeny']['rules'] = ['allow mary from 192.168.100.[50-100]']; // allow only 'mary' to connect from host 192.168.100.50 through 192.168.100.100 $cfg['servers'][$i]['allowdeny']['order'] = 'allow,deny'; $cfg['servers'][$i]['allowdeny']['rules'] = ['allow % from 192.168.[5-6].10']; // allow any user to connect from host 192.168.5.10 or 192.168.6.10 $cfg['servers'][$i]['allowdeny']['order'] = 'allow,deny'; $cfg['servers'][$i]['allowdeny']['rules'] = ['allow root from 192.168.5.50','allow % from 192.168.6.10']; // allow any user to connect from 192.168.6.10, and additionally allow root to connect from 192.168.5.50
-
$cfg['servers'][$i]['disableis']
¶ - type
boolean
- default value
false
disable using
information_schema
to retrieve information (useshow
commands instead), because of speed issues when many databases are present.note
enabling this option might give you a big performance boost on older mysql servers.
-
$cfg['servers'][$i]['signonscript']
¶ - type
string
- default value
''
new in version 3.5.0.
name of php script to be sourced and executed to obtain login credentials. this is alternative approach to session based single signon. the script has to provide a function called
get_login_credentials
which returns list of username and password, accepting single parameter of existing username (can be empty). seeexamples/signon-script.php
for an example:php /** * single signon for phpmyadmin * * this is just example how to use script based single signon with * phpmyadmin, it is not intended to be perfect code and look, only * shows how you can integrate this functionality in your application. */ declare(strict_types=1); // phpcs:disable squiz.functions.globalfunction /** * this function returns username and password. * * it can optionally use configured username as parameter. * * @param string $user user name * * @return array */ function get_login_credentials($user) { /* optionally we can use passed username */ if (! empty($user)) { return [ $user, 'password', ]; } /* here we would retrieve the credentials */ return [ 'root', '', ]; }
see also
-
$cfg['servers'][$i]['signonsession']
¶ - type
string
- default value
''
name of session which will be used for signon authentication method. you should use something different than
phpmyadmin
, because this is session which phpmyadmin uses internally. takes effect only if$cfg['servers'][$i]['signonscript']
is not configured.see also
- type
array
- default value
array()
new in version 4.7.0.
an associative array of session cookie parameters of other authentication system. it is not needed if the other system doesn’t use session_set_cookie_params(). keys should include ‘lifetime’, ‘path’, ‘domain’, ‘secure’ or ‘httponly’. valid values are mentioned in , they should be set to same values as the other application uses. takes effect only if
$cfg['servers'][$i]['signonscript']
is not configured.see also
-
$cfg['servers'][$i]['signonurl']
¶ - type
string
- default value
''
url where user will be redirected to log in for signon authentication method. should be absolute including protocol.
see also
-
$cfg['servers'][$i]['logouturl']
¶ - type
string
- default value
''
url where user will be redirected after logout (doesn’t affect config authentication method). should be absolute including protocol.
-
$cfg['servers'][$i]['hide_connection_errors']
¶ - type
boolean
- default value
false
new in version 4.9.8.
whether to show or hide detailed mysql/mariadb connection errors on the login page.
note
this error message can contain the target database server hostname or ip address, which may reveal information about your network to an attacker.
generic settings¶
-
$cfg['disableshortcutkeys']
¶ - type
boolean
- default value
false
you can disable phpmyadmin shortcut keys by setting
$cfg['disableshortcutkeys']
to false.
-
$cfg['serverdefault']
¶ - type
integer
- default value
1
if you have more than one server configured, you can set
$cfg['serverdefault']
to any one of them to autoconnect to that server when phpmyadmin is started, or set it to 0 to be given a list of servers without logging in.if you have only one server configured,
$cfg['serverdefault']
must be set to that server.
-
$cfg['versioncheck']
¶ - type
boolean
- default value
true
enables check for latest versions using javascript on the main phpmyadmin page or by directly accessing index.php?route=/version-check.
note
this setting can be adjusted by your vendor.
-
$cfg['proxyurl']
¶ - type
string
- default value
''
the url of the proxy to be used when phpmyadmin needs to access the outside internet such as when retrieving the latest version info or submitting error reports. you need this if the server where phpmyadmin is installed does not have direct access to the internet. the format is: “hostname:portnumber”
-
$cfg['proxyuser']
¶ - type
string
- default value
''
the username for authenticating with the proxy. by default, no authentication is performed. if a username is supplied, basic authentication will be performed. no other types of authentication are currently supported.
-
$cfg['proxypass']
¶ - type
string
- default value
''
the password for authenticating with the proxy.
-
$cfg['maxdblist']
¶ - type
integer
- default value
100
the maximum number of database names to be displayed in the main panel’s database list.
-
$cfg['maxtablelist']
¶ - type
integer
- default value
250
the maximum number of table names to be displayed in the main panel’s list (except on the export page).
-
$cfg['showhint']
¶ - type
boolean
- default value
true
whether or not to show hints (for example, hints when hovering over table headers).
-
$cfg['maxcharactersindisplayedsql']
¶ - type
integer
- default value
1000
the maximum number of characters when a sql query is displayed. the default limit of 1000 should be correct to avoid the display of tons of hexadecimal codes that represent blobs, but some users have real sql queries that are longer than 1000 characters. also, if a query’s length exceeds this limit, this query is not saved in the history.
-
$cfg['persistentconnections']
¶ - type
boolean
- default value
false
whether should be used or not.
see also
-
$cfg['forcessl']
¶ - type
boolean
- default value
false
deprecated since version 4.6.0: this setting is no longer available since phpmyadmin 4.6.0. please adjust your webserver instead.
whether to force using https while accessing phpmyadmin. in a reverse proxy setup, setting this to
true
is not supported.note
in some setups (like separate ssl proxy or load balancer) you might have to set
$cfg['pmaabsoluteuri']
for correct redirection.
-
$cfg['mysqlsslwarningsafehosts']
¶ - type
array
- default value
['127.0.0.1', 'localhost']
this search is case-sensitive and will match the exact string only. if your setup does not use ssl but is safe because you are using a local connection or private network, you can add your hostname or ip to the list. you can also remove the default entries to only include yours.
this check uses the value of
$cfg['servers'][$i]['host']
.new in version 5.1.0.
example configuration
$cfg['mysqlsslwarningsafehosts'] = ['127.0.0.1', 'localhost', 'mariadb.local'];
-
$cfg['exectimelimit']
¶ - type
integer [number of seconds]
- default value
300
set the number of seconds a script is allowed to run. if seconds is set to zero, no time limit is imposed. this setting is used while importing/exporting dump files but has no effect when php is running in safe mode.
-
$cfg['sessionsavepath']
¶ - type
string
- default value
''
path for storing session data ().
warning
this folder should not be publicly accessible through the webserver, otherwise you risk leaking private data from your session.
-
$cfg['memorylimit']
¶ - type
string [number of bytes]
- default value
'-1'
set the number of bytes a script is allowed to allocate. if set to
'-1'
, no limit is imposed. if set to'0'
, no change of the memory limit is attempted and thephp.ini
memory_limit
is used.this setting is used while importing/exporting dump files so you definitely don’t want to put here a too low value. it has no effect when php is running in safe mode.
you can also use any string as in
php.ini
, eg. ‘16m’. ensure you don’t omit the suffix (16 means 16 bytes!)
-
$cfg['skiplockedtables']
¶ - type
boolean
- default value
false
mark used tables and make it possible to show databases with locked tables (since mysql 3.23.30).
-
$cfg['showsql']
¶ - type
boolean
- default value
true
defines whether sql queries generated by phpmyadmin should be displayed or not.
-
$cfg['retainquerybox']
¶ - type
boolean
- default value
false
defines whether the sql query box should be kept displayed after its submission.
-
$cfg['codemirrorenable']
¶ - type
boolean
- default value
true
defines whether to use a javascript code editor for sql query boxes. codemirror provides syntax highlighting and line numbers. however, middle-clicking for pasting the clipboard contents in some linux distributions (such as ubuntu) is not supported by all browsers.
-
$cfg['defaultforeignkeychecks']
¶ - type
string
- default value
'default'
default value of the checkbox for foreign key checks, to disable/enable foreign key checks for certain queries. the possible values are
'default'
,'enable'
or'disable'
. if set to'default'
, the value of the mysql variableforeign_key_checks
is used.
-
$cfg['allowuserdropdatabase']
¶ - type
boolean
- default value
false
warning
this is not a security measure as there will be always ways to circumvent this. if you want to prohibit users from dropping databases, revoke their corresponding drop privilege.
defines whether normal users (non-administrator) are allowed to delete their own database or not. if set as false, the link drop database will not be shown, and even a
drop database mydatabase
will be rejected. quite practical for isp ‘s with many customers.this limitation of sql queries is not as strict as when using mysql privileges. this is due to nature of sql queries which might be quite complicated. so this choice should be viewed as help to avoid accidental dropping rather than strict privilege limitation.
-
$cfg['confirm']
¶ - type
boolean
- default value
true
whether a warning (“are your really sure…”) should be displayed when you’re about to lose data.
-
$cfg['usedbsearch']
¶ - type
boolean
- default value
true
define whether the “search string inside database” is enabled or not.
-
$cfg['ignoremultisubmiterrors']
¶ - type
boolean
- default value
false
define whether phpmyadmin will continue executing a multi-query statement if one of the queries fails. default is to abort execution.
-
$cfg['enable_drag_drop_import']
¶ - type
boolean
- default value
true
whether or not the drag and drop import feature is enabled. when enabled, a user can drag a file in to their browser and phpmyadmin will attempt to import the file.
-
$cfg['urlqueryencryption']
¶ - type
boolean
- default value
false
new in version 4.9.8.
define whether phpmyadmin will encrypt sensitive data (like database name and table name) from the url query string. default is to not encrypt the url query string.
-
$cfg['urlqueryencryptionsecretkey']
¶ - type
string
- default value
''
new in version 4.9.8.
a secret key used to encrypt/decrypt the url query string. should be 32 bytes long.
cookie authentication options¶
-
$cfg['blowfish_secret']
¶ - type
string
- default value
''
the “cookie” auth_type uses aes algorithm to encrypt the password. if you are using the “cookie” auth_type, enter here a random passphrase of your choice. it will be used internally by the aes algorithm: you won’t be prompted for this passphrase.
the secret should be 32 characters long. using shorter will lead to weaker security of encrypted cookies, using longer will cause no harm.
note
the configuration is called blowfish_secret for historical reasons as blowfish algorithm was originally used to do the encryption.
changed in version 3.1.0: since version 3.1.0 phpmyadmin can generate this on the fly, but it makes a bit weaker security as this generated secret is stored in session and furthermore it makes impossible to recall user name from cookie.
- type
string
- default value
'strict'
new in version 5.1.0.
it sets samesite attribute of the set-cookie http response header. valid values are:
lax
strict
none
see also
- type
boolean
- default value
true
define whether the previous login should be recalled or not in cookie authentication mode.
this is automatically disabled if you do not have configured
$cfg['blowfish_secret']
.
- type
integer [number of seconds]
- default value
1440
define how long a login cookie is valid. please note that php configuration option might limit session validity and if the session is lost, the login cookie is also invalidated. so it is a good idea to set
session.gc_maxlifetime
at least to the same value of$cfg['logincookievalidity']
.
- type
integer [number of seconds]
- default value
0
define how long login cookie should be stored in browser. default 0 means that it will be kept for existing session. this is recommended for not trusted environments.
- type
boolean
- default value
true
if enabled (default), logout deletes cookies for all servers, otherwise only for current one. setting this to false makes it easy to forget to log out from other server, when you are using more of them.
-
$cfg['allowarbitraryserver']
¶ - type
boolean
- default value
false
if enabled, allows you to log in to arbitrary servers using cookie authentication.
note
please use this carefully, as this may allow users access to mysql servers behind the firewall where your http server is placed. see also
$cfg['arbitraryserverregexp']
.
-
$cfg['arbitraryserverregexp']
¶ - type
string
- default value
''
restricts the mysql servers to which the user can log in when
$cfg['allowarbitraryserver']
is enabled by matching the ip or the hostname of the mysql server to the given regular expression. the regular expression must be enclosed with a delimiter character.it is recommended to include start and end symbols in the regular expression, so that you can avoid partial matches on the string.
examples:
// allow connection to three listed servers: $cfg['arbitraryserverregexp'] = '/^(server|another|yetdifferent)$/'; // allow connection to range of ip addresses: $cfg['arbitraryserverregexp'] = '@^192\.168\.0\.[0-9]{1,}$@'; // allow connection to server name ending with -mysql: $cfg['arbitraryserverregexp'] = '@^[^:]\-mysql$@';
note
the whole server name is matched, it can include port as well. due to way mysql is permissive in connection parameters, it is possible to use connection strings as
`server:3306-mysql`
. this can be used to bypass regular expression by the suffix, while connecting to another server.
-
$cfg['captchamethod']
¶ - type
string
- default value
'invisible'
valid values are:
'invisible'
use an invisible captcha checking method;'checkbox'
use a checkbox to confirm the user is not a robot.
new in version 5.0.3.
-
$cfg['captchaapi']
¶ - type
string
- default value
'https://www.google.com/recaptcha/api.js'
new in version 5.1.0.
the url for the recaptcha v2 service’s api, either google’s or a compatible one.
-
$cfg['captchacsp']
¶ - type
string
- default value
'https://apis.google.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://ssl.gstatic.com/'
new in version 5.1.0.
the content-security-policy snippet (urls from which to allow embedded content) for the recaptcha v2 service, either google’s or a compatible one.
-
$cfg['captcharequestparam']
¶ - type
string
- default value
'g-recaptcha'
new in version 5.1.0.
the request parameter used for the recaptcha v2 service.
-
$cfg['captcharesponseparam']
¶ - type
string
- default value
'g-recaptcha-response'
new in version 5.1.0.
the response parameter used for the recaptcha v2 service.
-
$cfg['captchaloginpublickey']
¶ - type
string
- default value
''
the public key for the recaptcha service that can be obtained from the “admin console” on .
see also
<>
recaptcha will be then used in cookie authentication mode.
new in version 4.1.0.
-
$cfg['captchaloginprivatekey']
¶ - type
string
- default value
''
the private key for the recaptcha service that can be obtained from the “admin console” on .
see also
<>
recaptcha will be then used in cookie authentication mode.
new in version 4.1.0.
-
$cfg['captchasiteverifyurl']
¶ - type
string
- default value
''
the url for the recaptcha service to do siteverify action.
recaptcha will be then used in cookie authentication mode.
new in version 5.1.0.
main panel¶
-
$cfg['showstats']
¶ - type
boolean
- default value
true
defines whether or not to display space usage and statistics about databases and tables. note that statistics requires at least mysql 3.23.3 and that, at this date, mysql doesn’t return such information for berkeley db tables.
-
$cfg['showserverinfo']
¶ - type
boolean
- default value
true
defines whether to display detailed server information on main page. you can additionally hide more information by using
$cfg['servers'][$i]['verbose']
.
-
$cfg['showphpinfo']
¶ - type
boolean
- default value
false
defines whether to display the php information or not at the starting main (right) frame.
please note that to block the usage of
phpinfo()
in scripts, you have to put this in yourphp.ini
:disable_functions = phpinfo()
warning
enabling phpinfo page will leak quite a lot of information about server setup. is it not recommended to enable this on shared installations.
this might also make easier some remote attacks on your installations, so enable this only when needed.
-
$cfg['showchgpassword']
¶ - type
boolean
- default value
true
defines whether to display the change password link or not at the starting main (right) frame. this setting does not check mysql commands entered directly.
please note that enabling the change password link has no effect with config authentication mode: because of the hard coded password value in the configuration file, end users can’t be allowed to change their passwords.
-
$cfg['showcreatedb']
¶ - type
boolean
- default value
true
defines whether to display the form for creating database or not at the starting main (right) frame. this setting does not check mysql commands entered directly.
-
$cfg['showgitrevision']
¶ - type
boolean
- default value
true
defines whether to display information about the current git revision (if applicable) on the main panel.
-
$cfg['mysqlminversion']
¶ - type
array
defines the minimum supported mysql version. the default is chosen by the phpmyadmin team; however this directive was asked by a developer of the plesk control panel to ease integration with older mysql servers (where most of the phpmyadmin features work).
database structure¶
-
$cfg['showdbstructurecreation']
¶ - type
boolean
- default value
false
defines whether the database structure page (tables list) has a “creation” column that displays when each table was created.
-
$cfg['showdbstructurelastupdate']
¶ - type
boolean
- default value
false
defines whether the database structure page (tables list) has a “last update” column that displays when each table was last updated.
-
$cfg['showdbstructurelastcheck']
¶ - type
boolean
- default value
false
defines whether the database structure page (tables list) has a “last check” column that displays when each table was last checked.
-
$cfg['hidestructureactions']
¶ - type
boolean
- default value
true
defines whether the table structure actions are hidden under a “more” drop-down.
-
$cfg['showcolumncomments']
¶ - type
boolean
- default value
true
defines whether to show column comments as a column in the table structure view.
browse mode¶
- type
string
- default value
'icons'
defines whether the table navigation links contain
'icons'
,'text'
or'both'
.
-
$cfg['actionlinksmode']
¶ - type
string
- default value
'both'
if set to
icons
, will display icons instead of text for db and table properties links (like browse, select, insert, …). can be set to'both'
if you want icons and text. when set totext
, will only show text.
-
$cfg['rowactiontype']
¶ - type
string
- default value
'both'
whether to display icons or text or both icons and text in table row action segment. value can be either of
'icons'
,'text'
or'both'
.
-
$cfg['showall']
¶ - type
boolean
- default value
false
defines whether a user should be displayed a “show all” button in browse mode or not in all cases. by default it is shown only on small tables (less than 500 rows) to avoid performance issues while getting too many rows.
-
$cfg['maxrows']
¶ - type
integer
- default value
25
number of rows displayed when browsing a result set and no limit clause is used. if the result set contains more rows, “previous” and “next” links will be shown. possible values: 25,50,100,250,500.
-
$cfg['order']
¶ - type
string
- default value
'smart'
defines whether columns are displayed in ascending (
asc
) order, in descending (desc
) order or in a “smart” (smart
) order - i.e. descending order for columns of type time, date, datetime and timestamp, ascending order else- by default.changed in version 3.4.0: since phpmyadmin 3.4.0 the default value is
'smart'
.
-
$cfg['gridediting']
¶ - type
string
- default value
'double-click'
defines which action (
double-click
orclick
) triggers grid editing. can be deactivated with thedisabled
value.
-
$cfg['relationaldisplay']
¶ - type
string
- default value
'k'
defines the initial behavior for options > relational.
k
, which is the default, displays the key whiled
shows the display column.
-
$cfg['savecellsatonce']
¶ - type
boolean
- default value
false
defines whether or not to save all edited cells at once for grid editing.
editing mode¶
-
$cfg['protectbinary']
¶ - type
boolean or string
- default value
'blob'
defines whether
blob
orbinary
columns are protected from editing when browsing a table’s content. valid values are:false
to allow editing of all columns;'blob'
to allow editing of all columns exceptblobs
;'noblob'
to disallow editing of all columns exceptblobs
(the opposite of'blob'
);'all'
to disallow editing of allbinary
orblob
columns.
-
$cfg['showfunctionfields']
¶ - type
boolean
- default value
true
defines whether or not mysql functions fields should be initially displayed in edit/insert mode. since version 2.10, the user can toggle this setting from the interface.
-
$cfg['showfieldtypesindataeditview']
¶ - type
boolean
- default value
true
defines whether or not type fields should be initially displayed in edit/insert mode. the user can toggle this setting from the interface.
-
$cfg['insertrows']
¶ - type
integer
- default value
2
defines the default number of rows to be entered from the insert page. users can manually change this from the bottom of that page to add or remove blank rows.
-
$cfg['foreignkeymaxlimit']
¶ - type
integer
- default value
100
if there are fewer items than this in the set of foreign keys, then a drop-down box of foreign keys is presented, in the style described by the
$cfg['foreignkeydropdownorder']
setting.
-
$cfg['foreignkeydropdownorder']
¶ - type
array
- default value
array(‘content-id’, ‘id-content’)
for the foreign key drop-down fields, there are several methods of display, offering both the key and value data. the contents of the array should be one or both of the following strings:
content-id
,id-content
.
export and import settings¶
-
$cfg['zipdump']
¶ - type
boolean
- default value
true
-
$cfg['gzipdump']
¶ - type
boolean
- default value
true
-
$cfg['bzipdump']
¶ - type
boolean
- default value
true
defines whether to allow the use of zip/gzip/bzip2 compression when creating a dump file
-
$cfg['compressonfly']
¶ - type
boolean
- default value
true
defines whether to allow on the fly compression for gzip/bzip2 compressed exports. this doesn’t affect smaller dumps and allows users to create larger dumps that won’t otherwise fit in memory due to php memory limit. produced files contain more gzip/bzip2 headers, but all normal programs handle this correctly.
-
$cfg['export']
¶ - type
array
- default value
array(…)
in this array are defined default parameters for export, names of items are similar to texts seen on export page, so you can easily identify what they mean.
-
$cfg['export']['format']
¶ - type
string
- default value
'sql'
default export format.
-
$cfg['export']['method']
¶ - type
string
- default value
'quick'
defines how the export form is displayed when it loads. valid values are:
quick
to display the minimum number of options to configurecustom
to display every available option to configurecustom-no-form
same ascustom
but does not display the option of using quick export
-
$cfg['export']['charset']
¶ - type
string
- default value
''
defines charset for generated export. by default no charset conversion is done assuming utf-8.
-
$cfg['export']['file_template_table']
¶ - type
string
- default value
'@table@'
default filename template for table exports.
see also
-
$cfg['export']['file_template_database']
¶ - type
string
- default value
'@database@'
default filename template for database exports.
see also
-
$cfg['export']['file_template_server']
¶ - type
string
- default value
'@server@'
default filename template for server exports.
see also
-
$cfg['export']['remove_definer_from_definitions']
¶ - type
boolean
- default value
false
remove definer clause from the event, view and routine definitions.
new in version 5.2.0.
-
$cfg['import']
¶ - type
array
- default value
array(…)
in this array are defined default parameters for import, names of items are similar to texts seen on import page, so you can easily identify what they mean.
-
$cfg['import']['charset']
¶ - type
string
- default value
''
defines charset for import. by default no charset conversion is done assuming utf-8.
tabs display settings¶
-
$cfg['tabsmode']
¶ - type
string
- default value
'both'
defines whether the menu tabs contain
'icons'
,'text'
or'both'
.
-
$cfg['propertiesnumcolumns']
¶ - type
integer
- default value
1
how many columns will be utilized to display the tables on the database property view? when setting this to a value larger than 1, the type of the database will be omitted for more display space.
-
$cfg['defaulttabserver']
¶ - type
string
- default value
'welcome'
defines the tab displayed by default on server view. the possible values are the localized equivalent of:
welcome
(recommended for multi-user setups)databases
,status
variables
privileges
-
$cfg['defaulttabdatabase']
¶ - type
string
- default value
'structure'
defines the tab displayed by default on database view. the possible values are the localized equivalent of:
structure
sql
search
operations
-
$cfg['defaulttabtable']
¶ - type
string
- default value
'browse'
defines the tab displayed by default on table view. the possible values are the localized equivalent of:
structure
sql
search
insert
browse
pdf options¶
-
$cfg['pdfpagesizes']
¶ - type
array
- default value
array('a3', 'a4', 'a5', 'letter', 'legal')
array of possible paper sizes for creating pdf pages.
you should never need to change this.
-
$cfg['pdfdefaultpagesize']
¶ - type
string
- default value
'a4'
default page size to use when creating pdf pages. valid values are any listed in
$cfg['pdfpagesizes']
.
languages¶
-
$cfg['defaultlang']
¶ - type
string
- default value
'en'
defines the default language to use, if not browser-defined or user- defined. the corresponding language file needs to be in locale/code/lc_messages/phpmyadmin.mo.
-
$cfg['defaultconnectioncollation']
¶ - type
string
- default value
'utf8mb4_general_ci'
defines the default connection collation to use, if not user-defined. see the for list of possible values.
-
$cfg['lang']
¶ - type
string
- default value
not set
force language to use. the corresponding language file needs to be in locale/code/lc_messages/phpmyadmin.mo.
-
$cfg['filterlanguages']
¶ - type
string
- default value
''
limit list of available languages to those matching the given regular expression. for example if you want only czech and english, you should set filter to
'^(cs|en)'
.
-
$cfg['recodingengine']
¶ - type
string
- default value
'auto'
you can select here which functions will be used for character set conversion. possible values are:
auto - automatically use available one (first is tested iconv, then recode)
iconv - use iconv or libiconv functions
recode - use recode_string function
mb - use mbstring extension
none - disable encoding conversion
enabled charset conversion activates a pull-down menu in the export and import pages, to choose the character set when exporting a file. the default value in this menu comes from
$cfg['export']['charset']
and$cfg['import']['charset']
.
-
$cfg['iconvextraparams']
¶ - type
string
- default value
'//translit'
specify some parameters for iconv used in charset conversion. see for details. by default
//translit
is used, so that invalid characters will be transliterated.
-
$cfg['availablecharsets']
¶ - type
array
- default value
array(…)
available character sets for mysql conversion. you can add your own (any of supported by recode/iconv) or remove these which you don’t use. character sets will be shown in same order as here listed, so if you frequently use some of these move them to the top.
web server settings¶
-
$cfg['obgzip']
¶ - type
string/boolean
- default value
'auto'
defines whether to use gzip output buffering for increased speed in http transfers. set to true/false for enabling/disabling. when set to ‘auto’ (string), phpmyadmin tries to enable output buffering and will automatically disable it if your browser has some problems with buffering. ie6 with a certain patch is known to cause data corruption when having enabled buffering.
-
$cfg['trustedproxies']
¶ - type
array
- default value
array()
lists proxies and http headers which are trusted for
$cfg['servers'][$i]['allowdeny']['order']
. this list is by default empty, you need to fill in some trusted proxy servers if you want to use rules for ip addresses behind proxy.the following example specifies that phpmyadmin should trust a http_x_forwarded_for (
x-forwarded-for
) header coming from the proxy 1.2.3.4:$cfg['trustedproxies'] = ['1.2.3.4' => 'http_x_forwarded_for'];
the
$cfg['servers'][$i]['allowdeny']['rules']
directive uses the client’s ip address as usual.
-
$cfg['gd2available']
¶ - type
string
- default value
'auto'
specifies whether gd >= 2 is available. if yes it can be used for mime transformations. possible values are:
auto - automatically detect
yes - gd 2 functions can be used
no - gd 2 function cannot be used
-
$cfg['checkconfigurationpermissions']
¶ - type
boolean
- default value
true
we normally check the permissions on the configuration file to ensure it’s not world writable. however, phpmyadmin could be installed on a ntfs filesystem mounted on a non-windows server, in which case the permissions seems wrong but in fact cannot be detected. in this case a sysadmin would set this parameter to
false
.
-
$cfg['linklengthlimit']
¶ - type
integer
- default value
1000
limit for length of url in links. when length would be above this limit, it is replaced by form with button. this is required as some web servers (iis) have problems with long url .
-
$cfg['cspallow']
¶ - type
string
- default value
''
additional string to include in allowed script and image sources in content security policy header.
this can be useful when you want to include some external javascript files in
config.footer.inc.php
orconfig.header.inc.php
, which would be normally not allowed by content security policy.to allow some sites, just list them within the string:
$cfg['cspallow'] = 'example.com example.net';
new in version 4.0.4.
-
$cfg['disablemultitablemaintenance']
¶ - type
boolean
- default value
false
in the database structure page, it’s possible to mark some tables then choose an operation like optimizing for many tables. this can slow down a server; therefore, setting this to
true
prevents this kind of multiple maintenance operation.
theme settings¶
please directly modify
themes/themename/scss/_variables.scss
, although your changes will be overwritten with the next update.
design customization¶
- type
boolean
- default value
true
when set to true, hovering over an item in the navigation panel causes that item to be marked (the background is highlighted).
-
$cfg['browsepointerenable']
¶ - type
boolean
- default value
true
when set to true, hovering over a row in the browse page causes that row to be marked (the background is highlighted).
-
$cfg['browsemarkerenable']
¶ - type
boolean
- default value
true
when set to true, a data row is marked (the background is highlighted) when the row is selected with the checkbox.
-
$cfg['limitchars']
¶ - type
integer
- default value
50
maximum number of characters shown in any non-numeric field on browse view. can be turned off by a toggle button on the browse page.
-
$cfg['rowactionlinks']
¶ - type
string
- default value
'left'
defines the place where table row links (edit, copy, delete) would be put when tables contents are displayed (you may have them displayed at the left side, right side, both sides or nowhere).
-
$cfg['rowactionlinkswithoutunique']
¶ - type
boolean
- default value
false
defines whether to show row links (edit, copy, delete) and checkboxes for multiple row operations even when the selection does not have a unique key. using row actions in the absence of a unique key may result in different/more rows being affected since there is no guaranteed way to select the exact row(s).
-
$cfg['remembersorting']
¶ - type
boolean
- default value
true
if enabled, remember the sorting of each table when browsing them.
-
$cfg['tableprimarykeyorder']
¶ - type
string
- default value
'none'
this defines the default sort order for the tables, having a primary key, when there is no sort order defines externally. acceptable values : [‘none’, ‘asc’, ‘desc’]
-
$cfg['showbrowsecomments']
¶ - type
boolean
- default value
true
-
$cfg['showpropertycomments']
¶ - type
boolean
- default value
true
by setting the corresponding variable to
true
you can enable the display of column comments in browse or property display. in browse mode, the comments are shown inside the header. in property mode, comments are displayed using a css-formatted dashed-line below the name of the column. the comment is shown as a tool-tip for that column.
-
$cfg['firstdayofcalendar']
¶ - type
integer
- default value
0
this will define the first day of week in the calendar. the number can be set from 0 to 6, which represents the seven days of the week, sunday to saturday respectively. this value can also be configured by the user in settings -> features -> general -> first day of calendar field.
text fields¶
-
$cfg['charediting']
¶ - type
string
- default value
'input'
defines which type of editing controls should be used for char and varchar columns. applies to data editing and also to the default values in structure editing. possible values are:
input - this allows to limit size of text to size of columns in mysql, but has problems with newlines in columns
textarea - no problems with newlines in columns, but also no length limitations
-
$cfg['minsizeforinputfield']
¶ - type
integer
- default value
4
defines the minimum size for input fields generated for char and varchar columns.
-
$cfg['maxsizeforinputfield']
¶ - type
integer
- default value
60
defines the maximum size for input fields generated for char and varchar columns.
-
$cfg['textareacols']
¶ - type
integer
- default value
40
-
$cfg['textarearows']
¶ - type
integer
- default value
15
-
$cfg['chartextareacols']
¶ - type
integer
- default value
40
-
$cfg['chartextarearows']
¶ - type
integer
- default value
7
number of columns and rows for the textareas. this value will be emphasized (*2) for sql query textareas and (*1.25) for sql textareas inside the query window.
the char* values are used for char and varchar editing (if configured via
$cfg['charediting']
).changed in version 5.0.0: the default value was changed from 2 to 7.
-
$cfg['longtextdoubletextarea']
¶ - type
boolean
- default value
true
defines whether textarea for longtext columns should have double size.
-
$cfg['textareaautoselect']
¶ - type
boolean
- default value
false
defines if the whole textarea of the query box will be selected on click.
-
$cfg['enableautocompletefortablesandcolumns']
¶ - type
boolean
- default value
true
whether to enable autocomplete for table and column names in any sql query box.
sql query box settings¶
-
$cfg['sqlquery']['edit']
¶ - type
boolean
- default value
true
whether to display an edit link to change a query in any sql query box.
-
$cfg['sqlquery']['explain']
¶ - type
boolean
- default value
true
whether to display a link to explain a select query in any sql query box.
-
$cfg['sqlquery']['showasphp']
¶ - type
boolean
- default value
true
whether to display a link to wrap a query in php code in any sql query box.
-
$cfg['sqlquery']['refresh']
¶ - type
boolean
- default value
true
whether to display a link to refresh a query in any sql query box.
web server upload/save/import directories¶
if php is running in safe mode, all directories must be owned by the same user as the owner of the phpmyadmin scripts.
if the directory where phpmyadmin is installed is subject to an
open_basedir
restriction, you need to create a temporary directory in some
directory accessible by the php interpreter.
for security reasons, all directories should be outside the tree published by
webserver. if you cannot avoid having this directory published by webserver,
limit access to it either by web server configuration (for example using
.htaccess or web.config files) or place at least an empty index.html
file there, so that directory listing is not possible. however as long as the
directory is accessible by web server, an attacker can guess filenames to download
the files.
-
$cfg['uploaddir']
¶ - type
string
- default value
''
the name of the directory where sql files have been uploaded by other means than phpmyadmin (for example, ftp). those files are available under a drop-down box when you click the database or table name, then the import tab.
if you want different directory for each user, %u will be replaced with username.
please note that the file names must have the suffix “.sql” (or “.sql.bz2” or “.sql.gz” if support for compressed formats is enabled).
this feature is useful when your file is too big to be uploaded via http, or when file uploads are disabled in php.
warning
please see top of this chapter (web server upload/save/import directories) for instructions how to setup this directory and how to make its usage secure.
see also
see 1.16 i cannot upload big dump files (memory, http or timeout problems). for alternatives.
-
$cfg['savedir']
¶ - type
string
- default value
''
the name of the webserver directory where exported files can be saved.
if you want a different directory for each user, %u will be replaced with the username.
please note that the directory must exist and has to be writable for the user running webserver.
warning
please see top of this chapter (web server upload/save/import directories) for instructions how to setup this directory and how to make its usage secure.
-
$cfg['tempdir']
¶ - type
string
- default value
'./tmp/'
the name of the directory where temporary files can be stored. it is used for several purposes, currently:
the templates cache which speeds up page loading.
esri shapefiles import, see 6.30 import: how can i import esri shapefiles?.
to work around limitations of
open_basedir
for uploaded files, see 1.11 i get an ‘open_basedir restriction’ while uploading a file from the import tab..
this directory should have as strict permissions as possible as the only user required to access this directory is the one who runs the webserver. if you have root privileges, simply make this user owner of this directory and make it accessible only by it:
chown www-data:www-data tmp chmod 700 tmp
if you cannot change owner of the directory, you can achieve a similar setup using acl:
chmod 700 tmp setfacl -m "g:www-data:rwx" tmp setfacl -d -m "g:www-data:rwx" tmp
if neither of above works for you, you can still make the directory chmod 777, but it might impose risk of other users on system reading and writing data in this directory.
warning
please see top of this chapter (web server upload/save/import directories) for instructions how to setup this directory and how to make its usage secure.
various display setting¶
-
$cfg['repeatcells']
¶ - type
integer
- default value
100
repeat the headers every x cells, or 0 to deactivate.
-
$cfg['queryhistorydb']
¶ - type
boolean
- default value
false
-
$cfg['queryhistorymax']
¶ - type
integer
- default value
25
if
$cfg['queryhistorydb']
is set totrue
, all your queries are logged to a table, which has to be created by you (see$cfg['servers'][$i]['history']
). if set to false, all your queries will be appended to the form, but only as long as your window is opened they remain saved.when using the javascript based query window, it will always get updated when you click on a new table/db to browse and will focus if you click on edit sql after using a query. you can suppress updating the query window by checking the box do not overwrite this query from outside the window below the query textarea. then you can browse tables/databases in the background without losing the contents of the textarea, so this is especially useful when composing a query with tables you first have to look in. the checkbox will get automatically checked whenever you change the contents of the textarea. please uncheck the button whenever you definitely want the query window to get updated even though you have made alterations.
if
$cfg['queryhistorydb']
is set totrue
you can specify the amount of saved history items using$cfg['queryhistorymax']
.
-
$cfg['browsemime']
¶ - type
boolean
- default value
true
enable transformations.
-
$cfg['maxexactcount']
¶ - type
integer
- default value
50000
for innodb tables, determines for how large tables phpmyadmin should get the exact row count using
select count
. if the approximate row count as returned byshow table status
is smaller than this value,select count
will be used, otherwise the approximate count will be used.changed in version 4.8.0: the default value was lowered to 50000 for performance reasons.
changed in version 4.2.6: the default value was changed to 500000.
-
$cfg['maxexactcountviews']
¶ - type
integer
- default value
0
for views, since obtaining the exact count could have an impact on performance, this value is the maximum to be displayed, using a
select count ... limit
. setting this to 0 bypasses any row counting.
-
$cfg['naturalorder']
¶ - type
boolean
- default value
true
sorts database and table names according to natural order (for example, t1, t2, t10). currently implemented in the navigation panel and in database view, for the table list.
-
$cfg['initialslidersstate']
¶ - type
string
- default value
'closed'
if set to
'closed'
, the visual sliders are initially in a closed state. a value of'open'
does the reverse. to completely disable all visual sliders, use'disabled'
.
-
$cfg['userprefsdisallow']
¶ - type
array
- default value
array()
contains names of configuration options (keys in
$cfg
array) that users can’t set through user preferences. for possible values, refer to classes underlibraries/classes/config/forms/user/
.
-
$cfg['userprefsdevelopertab']
¶ - type
boolean
- default value
false
new in version 3.4.0.
activates in the user preferences a tab containing options for developers of phpmyadmin.
page titles¶
-
$cfg['titletable']
¶ - type
string
- default value
'@http_host@ / @vserver@ / @database@ / @table@ | @phpmyadmin@'
-
$cfg['titledatabase']
¶ - type
string
- default value
'@http_host@ / @vserver@ / @database@ | @phpmyadmin@'
-
$cfg['titleserver']
¶ - type
string
- default value
'@http_host@ / @vserver@ | @phpmyadmin@'
-
$cfg['titledefault']
¶ - type
string
- default value
'@http_host@ | @phpmyadmin@'
allows you to specify window’s title bar. you can use 6.27 what format strings can i use?.
theme manager settings¶
-
$cfg['thememanager']
¶ - type
boolean
- default value
true
enables user-selectable themes. see 2.7 using and creating themes.
-
$cfg['themedefault']
¶ - type
string
- default value
'pmahomme'
the default theme (a subdirectory under
./themes/
).
-
$cfg['themeperserver']
¶ - type
boolean
- default value
false
whether to allow different theme for each server.
-
$cfg['fontsize']
¶ - type
string
- default value
‘82%’
deprecated since version 5.0.0: this setting was removed as the browser is more efficient, thus no need of this option.
font size to use, is applied in css.
default queries¶
-
$cfg['defaultquerytable']
¶ - type
string
- default value
'select * from @table@ where 1'
-
$cfg['defaultquerydatabase']
¶ - type
string
- default value
''
default queries that will be displayed in query boxes when user didn’t specify any. you can use standard 6.27 what format strings can i use?.
mysql settings¶
-
$cfg['defaultfunctions']
¶ - type
array
- default value
array('func_char' => '', 'func_date' => '', 'func_number' => '', 'func_spatial' => 'geomfromtext', 'func_uuid' => 'uuid', 'first_timestamp' => 'now')
functions selected by default when inserting/changing row, functions are defined for meta types as (
func_number
,func_date
,func_char
,func_spatial
,func_uuid
) and forfirst_timestamp
, which is used for first timestamp column in table.example configuration
$cfg['defaultfunctions'] = [ 'func_char' => '', 'func_date' => '', 'func_number' => '', 'func_spatial' => 'st_geomfromtext', 'func_uuid' => 'uuid', 'first_timestamp' => 'utc_timestamp', ];
default options for transformations¶
-
$cfg['defaulttransformations']
¶ - type
array
- default value
an array with below listed key-values
-
$cfg['defaulttransformations']['substring']
¶ - type
array
- default value
array(0, ‘all’, ‘…’)
-
$cfg['defaulttransformations']['bool2text']
¶ - type
array
- default value
array(‘t’, ‘f’)
-
$cfg['defaulttransformations']['external']
¶ - type
array
- default value
array(0, ‘-f /dev/null -i -wrap -q’, 1, 1)
-
$cfg['defaulttransformations']['preappend']
¶ - type
array
- default value
array(‘’, ‘’)
-
$cfg['defaulttransformations']['hex']
¶ - type
array
- default value
array(‘2’)
-
$cfg['defaulttransformations']['dateformat']
¶ - type
array
- default value
array(0, ‘’, ‘local’)
-
$cfg['defaulttransformations']['inline']
¶ - type
array
- default value
array(‘100’, 100)
-
$cfg['defaulttransformations']['textimagelink']
¶ - type
array
- default value
array(‘’, 100, 50)
-
$cfg['defaulttransformations']['textlink']
¶ - type
array
- default value
array(‘’, ‘’, ‘’)
console settings¶
note
these settings are mostly meant to be changed by user.
-
$cfg['console']['starthistory']
¶ - type
boolean
- default value
false
show query history at start
-
$cfg['console']['alwaysexpand']
¶ - type
boolean
- default value
false
always expand query messages
-
$cfg['console']['currentquery']
¶ - type
boolean
- default value
true
show current browsing query
-
$cfg['console']['enterexecutes']
¶ - type
boolean
- default value
false
execute queries on enter and insert new line with shift enter
-
$cfg['console']['darktheme']
¶ - type
boolean
- default value
false
switch to dark theme
-
$cfg['console']['mode']
¶ - type
string
- default value
‘info’
console mode
-
$cfg['console']['height']
¶ - type
integer
- default value
92
console height
developer¶
warning
these settings might have huge effect on performance or security.
-
$cfg['environment']
¶ - type
string
- default value
'production'
sets the working environment.
this only needs to be changed when you are developing phpmyadmin itself. the
development
mode may display debug information in some places.possible values are
'production'
or'development'
.
-
$cfg['dbg']
¶ - type
array
- default value
[]
-
$cfg['dbg']['sql']
¶ - type
boolean
- default value
false
enable logging queries and execution times to be displayed in the console’s debug sql tab.
-
$cfg['dbg']['sqllog']
¶ - type
boolean
- default value
false
enable logging of queries and execution times to the syslog. requires
$cfg['dbg']['sql']
to be enabled.
-
$cfg['dbg']['demo']
¶ - type
boolean
- default value
false
enable to let server present itself as demo server. this is used for .
it currently changes following behavior:
there is welcome message on the main page.
there is footer information about demo server and used git revision.
the setup script is enabled even with existing configuration.
the setup does not try to connect to the mysql server.
-
$cfg['dbg']['simple2fa']
¶ - type
boolean
- default value
false
can be used for testing two-factor authentication using simple two-factor authentication.
examples¶
see following configuration snippets for typical setups of phpmyadmin.
basic example¶
example configuration file, which can be copied to config.inc.php
to
get some core configuration layout; it is distributed with phpmyadmin as
config.sample.inc.php
. please note that it does not contain all
configuration options, only the most frequently used ones.
php
/**
* phpmyadmin sample configuration, you can use it as base for
* manual configuration. for easier setup you can use setup/
*
* all directives are explained in documentation in the doc/ folder
* or at .
*/
declare(strict_types=1);
/**
* this is needed for cookie based authentication to encrypt password in
* cookie. needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = ''; /* you must fill in this for cookie auth! */
/**
* servers configuration
*/
$i = 0;
/**
* first server
*/
$i;
/* authentication type */
$cfg['servers'][$i]['auth_type'] = 'cookie';
/* server parameters */
$cfg['servers'][$i]['host'] = 'localhost';
$cfg['servers'][$i]['compress'] = false;
$cfg['servers'][$i]['allownopassword'] = false;
/**
* phpmyadmin configuration storage settings.
*/
/* user used to manipulate with storage */
// $cfg['servers'][$i]['controlhost'] = '';
// $cfg['servers'][$i]['controlport'] = '';
// $cfg['servers'][$i]['controluser'] = 'pma';
// $cfg['servers'][$i]['controlpass'] = 'pmapass';
/* storage database and tables */
// $cfg['servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['servers'][$i]['relation'] = 'pma__relation';
// $cfg['servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['servers'][$i]['history'] = 'pma__history';
// $cfg['servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['servers'][$i]['recent'] = 'pma__recent';
// $cfg['servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['servers'][$i]['users'] = 'pma__users';
// $cfg['servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['servers'][$i]['export_templates'] = 'pma__export_templates';
/**
* end of servers configuration
*/
/**
* directories for saving/loading files from server
*/
$cfg['uploaddir'] = '';
$cfg['savedir'] = '';
/**
* whether to display icons or text or both icons and text in table row
* action segment. value can be either of 'icons', 'text' or 'both'.
* default = 'both'
*/
//$cfg['rowactiontype'] = 'icons';
/**
* defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['showall'] = true;
/**
* number of rows displayed when browsing a result set. if the result
* set contains more rows, "previous" and "next".
* possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['maxrows'] = 50;
/**
* disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for blob fields
* 'noblob' disallow editing except for blob fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['protectbinary'] = false;
/**
* default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['defaultlang'] = 'en';
//$cfg['defaultlang'] = 'de';
/**
* how many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['propertiesnumcolumns'] = 2;
/**
* set to true if you want db-based query history.if false, this utilizes
* js-routines to display query history (lost by window close)
*
* this requires configuration storage enabled, see above.
* default = false
*/
//$cfg['queryhistorydb'] = true;
/**
* when using db-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['queryhistorymax'] = 100;
/**
* whether or not to query the user before sending the error report to
* the phpmyadmin team when a javascript error occurs
*
* available options
* ('ask' | 'always' | 'never')
* default = 'ask'
*/
//$cfg['senderrorreports'] = 'always';
/**
* 'urlqueryencryption' defines whether phpmyadmin will encrypt sensitive data from the url query string.
* 'urlqueryencryptionsecretkey' is a 32 bytes long secret key used to encrypt/decrypt the url query string.
*/
//$cfg['urlqueryencryption'] = true;
//$cfg['urlqueryencryptionsecretkey'] = '';
/**
* you can find more configuration options in the documentation
* in the doc/ folder or at .
*/
warning
don’t use the controluser ‘pma’ if it does not yet exist and don’t use ‘pmapass’ as password.
example for signon authentication¶
this example uses examples/signon.php
to demonstrate usage of signon authentication mode:
php
$i = 0;
$i;
$cfg['servers'][$i]['auth_type'] = 'signon';
$cfg['servers'][$i]['signonsession'] = 'signonsession';
$cfg['servers'][$i]['signonurl'] = 'examples/signon.php';
example for ip address limited autologin¶
if you want to automatically login when accessing phpmyadmin locally while asking for a password when accessing remotely, you can achieve it using following snippet:
if ($_server['remote_addr'] === '127.0.0.1') {
$cfg['servers'][$i]['auth_type'] = 'config';
$cfg['servers'][$i]['user'] = 'root';
$cfg['servers'][$i]['password'] = 'yourpassword';
} else {
$cfg['servers'][$i]['auth_type'] = 'cookie';
}
note
filtering based on ip addresses isn’t reliable over the internet, use it only for local address.
example for using multiple mysql servers¶
you can configure any number of servers using $cfg['servers']
,
following example shows two of them:
php
$cfg['blowfish_secret'] = 'multiserverexample70518';
// any string of your choice
$i = 0;
$i; // server 1 :
$cfg['servers'][$i]['auth_type'] = 'cookie';
$cfg['servers'][$i]['verbose'] = 'no1';
$cfg['servers'][$i]['host'] = 'localhost';
// more options for #1 ...
$i; // server 2 :
$cfg['servers'][$i]['auth_type'] = 'cookie';
$cfg['servers'][$i]['verbose'] = 'no2';
$cfg['servers'][$i]['host'] = 'remote.host.addr';//or ip:'10.9.8.1'
// this server must allow remote clients, e.g., host 10.9.8.%
// not only in mysql.host but also in the startup configuration
// more options for #2 ...
// end of server sections
$cfg['serverdefault'] = 0; // to choose the server on startup
// further general options ...
google cloud sql with ssl¶
to connect to google could sql, you currently need to disable certificate verification. this is caused by the certificate being issued for cn matching your instance name, but you connect to an ip address and php tries to match these two. with verification you end up with error message like:
peer certificate cn=`api-project-851612429544:pmatest' did not match expected cn=`8.8.8.8'
warning
with disabled verification your traffic is encrypted, but you’re open to man in the middle attacks.
to connect phpmyadmin to google cloud sql using ssl download the client and server certificates and tell phpmyadmin to use them:
// ip address of your instance
$cfg['servers'][$i]['host'] = '8.8.8.8';
// use ssl for connection
$cfg['servers'][$i]['ssl'] = true;
// client secret key
$cfg['servers'][$i]['ssl_key'] = '../client-key.pem';
// client certificate
$cfg['servers'][$i]['ssl_cert'] = '../client-cert.pem';
// server certification authority
$cfg['servers'][$i]['ssl_ca'] = '../server-ca.pem';
// disable ssl verification (see above note)
$cfg['servers'][$i]['ssl_verify'] = false;
amazon rds aurora with ssl¶
to connect phpmyadmin to an amazon rds aurora mysql database instance using ssl, download the ca server certificate and tell phpmyadmin to use it:
// address of your instance
$cfg['servers'][$i]['host'] = 'replace-me-custer-name.cluster-replace-me-id.replace-me-region.rds.amazonaws.com';
// use ssl for connection
$cfg['servers'][$i]['ssl'] = true;
// you need to have the region ca file and the authority ca file (2019 edition ca for example) in the pem bundle for it to work
$cfg['servers'][$i]['ssl_ca'] = '../rds-combined-ca-bundle.pem';
// enable ssl verification
$cfg['servers'][$i]['ssl_verify'] = true;
see also
using ssl for connection to database server,
$cfg['servers'][$i]['ssl']
,
$cfg['servers'][$i]['ssl_ca']
,
$cfg['servers'][$i]['ssl_verify']
see also
current rds ca bundle for all regions
the rds ca (2019 edition) for the region eu-west-3 without the parent ca
recaptcha using hcaptcha¶
$cfg['captchaapi'] = 'https://www.hcaptcha.com/1/api.js';
$cfg['captchacsp'] = 'https://hcaptcha.com https://*.hcaptcha.com';
$cfg['captcharequestparam'] = 'h-captcha';
$cfg['captcharesponseparam'] = 'h-captcha-response';
$cfg['captchasiteverifyurl'] = 'https://hcaptcha.com/siteverify';
// this is the secret key from hcaptcha dashboard
$cfg['captchaloginprivatekey'] = '0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// this is the site key from hcaptcha dashboard
$cfg['captchaloginpublickey'] = 'xxx-xxx-xxx-xxx-xxxx';
see also
see also