Configuration ¶
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 inteded 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/layout.inc.php
. 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.
Warning
Mac users should note that if you are on a version before Mac OS X, PHP does not seem to like Mac end of lines character (\r
). So ensure you choose the option that allows to use the *nix end of line character (\n
) in your text editor before saving a script you have modified.
Configuration ¶
2.1 The error message "Warning: Cannot add header information - headers already sent by …" is displayed, what's the problem?¶
Edit your config.inc.php
file and ensure there is nothing (I.E. no blank lines, no spaces, no characters…) neither before the <?php
tag at the beginning, neither after the ?>
tag at the end.
2.2 phpMyAdmin can't connect to MySQL. What's wrong?¶
Either there is an error with your PHP setup or your username/password is wrong. Try to make a small script which uses mysql_connect and see if it works. If it doesn't, it may be you haven't even compiled MySQL support into PHP.
2.3 The error message "Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) …" is displayed. What can I do?¶
The error message can also be: Error #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured).
First, you need to determine what socket is being used by MySQL. To do this, connect to your server and go to the MySQL bin directory. In this directory there should be a file named mysqladmin. Type ./mysqladmin variables
, and this should give you a bunch of info about your MySQL server, including the socket (/tmp/mysql.sock, for example). You can also ask your ISP for the connection info or, if you're hosting your own, connect from the 'mysql' command-line client and type 'status' to get the connection type and socket or port number.
Then, you need to tell PHP to use this socket. You can do this for all PHP in the php.ini
or for phpMyAdmin only in the config.inc.php
. For example: $cfg['Servers'][$i]['socket']
Please also make sure that the permissions of this file allow to be readable by your webserver.
On my RedHat-Box the socket of MySQL is /var/lib/mysql/mysql.sock. In your php.ini
you will find a line
mysql.default_socket = /tmp/mysql.sock
change it to
mysql.default_socket = /var/lib/mysql/mysql.sock
Then restart apache and it will work.
Have also a look at the corresponding section of the MySQL documentation.
2.4 Nothing is displayed by my browser when I try to run phpMyAdmin, what can I do?¶
Try to set the $cfg['OBGzip']
directive to false
in the phpMyAdmin configuration file. It helps sometime. Also have a look at your PHP version number: if it contains "b" or "alpha" it means you're running a testing version of PHP. That's not a so good idea, please upgrade to a plain revision.
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?¶
Check your webserver setup if it correctly fills in either PHP_SELF or REQUEST_URI variables.
If you are running phpMyAdmin behind reverse proxy, please set the $cfg['PmaAbsoluteUri']
directive in the phpMyAdmin configuration file to match your setup.
2.6 I get an "Access denied for user: 'root@localhost' (Using password: YES)"-error when trying to access a MySQL-Server on a host which is port-forwarded for my localhost.¶
When you are using a port on your localhost, which you redirect via port-forwarding to another host, MySQL is not resolving the localhost as expected. Erik Wasser explains: The solution is: if your host is "localhost" MySQL (the command line tool mysql as well) always tries to use the socket connection for speeding up things. And that doesn't work in this configuration with port forwarding. If you enter "127.0.0.1" as hostname, everything is right and MySQL uses the TCP connection.
2.7 Using and creating themes¶
See Custom Themes.
2.8 I get "Missing parameters" errors, what can I do?¶
Here are a few points to check:
- In
config.inc.php
, try to leave the$cfg['PmaAbsoluteUri']
directive empty. See also 4.7 Authentication window is displayed more than once, why?. - Maybe you have a broken PHP installation or you need to upgrade your Zend Optimizer. See <https://bugs.php.net/bug.php?id=31134>.
- If you are using Hardened PHP with the ini directive
varfilter.max_request_variables
set to the default (200) or another low value, you could get this error if your table has a high number of columns. Adjust this setting accordingly. (Thanks to Klaus Dorninger for the hint). - In the
php.ini
directivearg_separator.input
, a value of ";" will cause this error. Replace it with "&;". - If you are using Suhosin, you might want to increase request limits.
- The directory specified in the
php.ini
directivesession.save_path
does not exist or is read-only (this can be caused by bug in the PHP installer).
2.9 Seeing an upload progress bar¶
To be able to see a progress bar during your uploads, your server must have the APC extension, the uploadprogress one, or you must be running PHP 5.4.0 or higher. Moreover, the JSON extension has to be enabled in your PHP.
If using APC, you must set apc.rfc1867
to on
in your php.ini
.
If using PHP 5.4.0 or higher, you must set session.upload_progress.enabled
to 1
in your php.ini
. However, starting from phpMyAdmin version 4.0.4, session-based upload progress has been temporarily deactivated due to its problematic behavior.
See also