Faq
Faq
Faq
_faq:
.. _faqserver:
Server
++++++
.. _faq1_1:
.. _faq1_2:
You should first try the latest versions of Apache (and possibly MySQL). If
your server keeps crashing, please ask for help in the various Apache support
groups.
.. seealso:: :ref:`faq1_1`
.. _faq1_3:
1.3 (withdrawn).
----------------
.. _faq1_4:
1.4 Using phpMyAdmin on IIS, I'm displayed the error message: "The specified CGI
application misbehaved by not returning a complete set of HTTP headers ...".
-----------------------------------------------------------------------------------
--------------------------------------------------------------------------
You just forgot to read the *install.txt* file from the PHP
distribution. Have a look at the last message in this `PHP bug report #12061
<https://bugs.php.net/bug.php?id=12061>`_ from the official PHP bug
database.
.. _faq1_5:
1.5 Using phpMyAdmin on IIS, I'm facing crashes and/or many error messages with the
HTTP.
-----------------------------------------------------------------------------------
------
This is a known problem with the PHP :term:`ISAPI` filter: it's not so stable.
Please use instead the cookie authentication mode.
.. _faq1_6:
.. _faq1_7:
1.7 How can I GZip a dump or a CSV export? It does not seem to work.
--------------------------------------------------------------------
.. _faq1_8:
1.8 I cannot insert a text file in a table, and I get an error about safe mode
being in effect.
-----------------------------------------------------------------------------------
------------
.. _faq1_9:
1.9 (withdrawn).
----------------
.. _faq1_10:
1.10 I'm having troubles when uploading files with phpMyAdmin running on a secure
server. My browser is Internet Explorer and I'm using the Apache server.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------
As suggested by "Rob M" in the phpWizard forum, add this line to your
*httpd.conf*:
.. code-block:: apache
.. _faq1_11:
1.11 I get an 'open\_basedir restriction' while uploading a file from the query
box.
-----------------------------------------------------------------------------------
-
.. _faq1_12:
.. _faq1_13:
1.13 (withdrawn).
-----------------
.. _faq1_14:
1.14 (withdrawn).
-----------------
.. _faq1_15:
.. _faq1_16:
1.16 I cannot upload big dump files (memory, HTTP or timeout problems).
-----------------------------------------------------------------------
Starting with version 2.7.0, the import engine has been rewritten and
these problems should not occur. If possible, upgrade your phpMyAdmin
to the latest version to take advantage of the new import features.
The first things to check (or ask your host provider to check) are the
values of ``upload_max_filesize``, ``memory_limit`` and
``post_max_size`` in the :file:`php.ini` configuration file. All of these
three settings limit the maximum size of data that can be submitted
and handled by PHP. One user also said that ``post_max_size`` and
``memory_limit`` need to be larger than ``upload_max_filesize``.
There exist several workarounds if your upload is too big or your
hosting provider is unwilling to change the settings:
.. code-block:: mysql
source filename.sql;
.. _faq1_17:
.. _faq1_17a:
1.17a I cannot connect to the MySQL server. It always returns the error message,
"Client does not support authentication protocol requested by server; consider
upgrading MySQL client"
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------
You tried to access MySQL with an old MySQL client library. The
version of your MySQL client library can be checked in your phpinfo()
output. In general, it should have at least the same minor version as
your server - as mentioned in :ref:`faq1_17`. This problem is
generally caused by using MySQL version 4.1 or newer. MySQL changed
the authentication hash and your PHP is trying to use the old method.
The proper solution is to use the `mysqli extension
<https://www.php.net/mysqli>`_ with the proper client library to match
your MySQL installation. More
information (and several workarounds) are located in the `MySQL
Documentation <https://dev.mysql.com/doc/mysql/en/old-client.html>`_.
.. _faq1_18:
1.18 (withdrawn).
-----------------
.. _faq1_19:
1.19 I can't run the "display relations" feature because the script seems not to
know the font face I'm using!
-----------------------------------------------------------------------------------
---------------------------
The :term:`TCPDF` library we're using for this feature requires some special
files to use font faces. Please refers to the `TCPDF manual
<https://tcpdf.org/>`_ to build these files.
.. _faqmysql:
There are currently two interfaces PHP provides as MySQL extensions - ``mysql``
and ``mysqli``. The ``mysqli`` is tried first, because it's the best one.
.. _faq1_21:
1.21 I am running the CGI version of PHP under Unix, and I cannot log in using
cookie auth.
-----------------------------------------------------------------------------------
--------
.. _faq1_22:
1.22 I don't see the "Location of text file" field, so I cannot upload.
-----------------------------------------------------------------------
.. _faq1_23:
1.23 I'm running MySQL on a Win32 machine. Each time I create a new table the table
and column names are changed to lowercase!
-----------------------------------------------------------------------------------
-------------------------------------------
set-variable = lower_case_table_names=0
Next, save the file and restart the MySQL service. You can always
check the value of this directive using the query
.. code-block:: mysql
.. _faq1_24:
1.24 (withdrawn).
-----------------
.. _faq1_25:
A tip from Jose Fandos: put a comment on the following two lines in
httpd.conf, like this:
.. code-block:: apache
.. _faq1_26:
1.26 I just installed phpMyAdmin in my document root of IIS but I get the error "No
input file specified" when trying to run phpMyAdmin.
-----------------------------------------------------------------------------------
-----------------------------------------------------
.. _faq1_27:
1.27 I get empty page when I want to view huge page (eg. db\_structure.php with
plenty of tables).
-----------------------------------------------------------------------------------
---------------
1.28 My MySQL server sometimes refuses queries and returns the message 'Errorcode:
13'. What does this mean?
-----------------------------------------------------------------------------------
-------------------------
This can happen due to a MySQL bug when having database / table names
with upper case characters although ``lower_case_table_names`` is
set to 1. To fix this, turn off this directive, convert all database
and table names to lower case and turn it on again. Alternatively,
there's a bug-fix available starting with MySQL 3.23.56 /
4.0.11-gamma.
.. _faq1_29:
1.29 When I create a table or modify a column, I get an error and the columns are
duplicated.
-----------------------------------------------------------------------------------
----------
.. code-block:: apache
SetOutputFilter PHP
SetInputFilter PHP
and
.. code-block:: apache
.. code-block:: apache
#SetOutputFilter PHP
#SetInputFilter PHP
.. _faq1_30:
Yes.
Since release 4.5, phpMyAdmin supports only PHP 5.5 and newer. Since release 4.1
phpMyAdmin supports only PHP 5.3 and newer. For PHP 5.2 you can use 4.0.x releases.
.. _faq1_32:
Yes. This procedure was tested with phpMyAdmin 2.6.1, PHP 4.3.9 in
:term:`ISAPI` mode under :term:`IIS` 5.1.
.. seealso:: :rfc:`2616`
.. _faq1_33:
1.33 (withdrawn).
-----------------
.. _faq1_34:
.. code-block:: apache
RewriteEngine On
RewriteBase /path_to_phpMyAdmin
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?
db=$1&table=$2&target=$3 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
.. _faq1_35:
.. code-block:: apache
RewriteEngine On
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
.. _faq1_36:
.. _faq1_37:
.. _faq1_38:
Yes but the default configuration values of Suhosin are known to cause
problems with some operations, for example editing a table with many
columns and no primary key or with textual primary key.
* `suhosin.request.max\_vars <http://www.hardened-
php.net/suhosin/configuration.html#suhosin.request.max_vars>`_ should
be increased (eg. 2048)
* `suhosin.post.max\_vars <http://www.hardened-
php.net/suhosin/configuration.html#suhosin.post.max_vars>`_ should be
increased (eg. 2048)
* `suhosin.request.max\_array\_index\_length <http://www.hardened-php.ne
t/suhosin/configuration.html#suhosin.request.max_array_index_length>`_
should be increased (eg. 256)
* `suhosin.post.max\_array\_index\_length <http://www.hardened-php.net/s
uhosin/configuration.html#suhosin.post.max_array_index_length>`_
should be increased (eg. 256)
* `suhosin.request.max\_totalname\_length <http://www.hardened-php.net/s
uhosin/configuration.html#suhosin.request.max_totalname_length>`_
should be increased (eg. 8192)
* `suhosin.post.max\_totalname\_length <http://www.hardened-php.net/suho
sin/configuration.html#suhosin.post.max_totalname_length>`_ should be
increased (eg. 8192)
* `suhosin.get.max\_value\_length <http://www.hardened-
php.net/suhosin/configuration.html#suhosin.get.max_value_length>`_
should be increased (eg. 1024)
* `suhosin.sql.bailout\_on\_error <http://www.hardened-
php.net/suhosin/configuration.html#suhosin.sql.bailout_on_error>`_
needs to be disabled (the default)
* `suhosin.log.\* <http://www.hardened-
php.net/suhosin/configuration.html#logging_configuration>`_ should not
include :term:`SQL`, otherwise you get big
slowdown
.. _faq1_39:
1.39 When I try to connect via https, I can log in, but then my connection is
redirected back to http. What can cause this behavior?
-----------------------------------------------------------------------------------
-------------------------------------------------
.. seealso:: <http://httpd.apache.org/docs/2.0/mod/mod_ssl.html#ssloptions>
.. _faq1_40:
1.40 When accessing phpMyAdmin via an Apache reverse proxy, cookie login does not
work.
-----------------------------------------------------------------------------------
----
To be able to use cookie auth Apache must know that it has to rewrite
the set-cookie headers. Example from the Apache 2.2 documentation:
.. code-block:: apache
.. code-block:: apache
.. seealso:: <https://httpd.apache.org/docs/2.2/mod/mod_proxy.html>,
:config:option:`$cfg['PmaAbsoluteUri']`
.. _faq1_41:
1.41 When I view a database and ask to see its privileges, I get an error about an
unknown column.
-----------------------------------------------------------------------------------
---------------
The MySQL server's privilege tables are not up to date, you need to
run the :command:`mysql_upgrade` command on the server.
.. _faq1_42:
You can add various rules to :term:`.htaccess` to filter access based on user agent
field. This is quite easy to circumvent, but could prevent at least
some robots accessing your installation.
.. code-block:: apache
RewriteEngine on
.. _faq1_43:
1.43 Why can't I display the structure of my table containing hundreds of columns?
----------------------------------------------------------------------------------
.. _faq1:44:
Some users have requested to be able to reduce the size of the phpMyAdmin
installation.
This is not recommended and could lead to confusion over missing features, but can
be done.
A list of files and corresponding functionality which degrade gracefully when
removed include:
.. _faqconfig:
Configuration
+++++++++++++
.. _faq2_1:
2.1 The error message "Warning: Cannot add header information - headers already
sent by ..." is displayed, what's the problem?
-----------------------------------------------------------------------------------
-------------------------------------------
.. _faq2_2:
.. _faq2_3:
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?
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
For RedHat users, Harald Legner suggests this on the mailing list:
.. code-block:: ini
mysql.default_socket = /tmp/mysql.sock
change it to
.. code-block:: ini
mysql.default_socket = /var/lib/mysql/mysql.sock
2.4 Nothing is displayed by my browser when I try to run phpMyAdmin, what can I do?
-----------------------------------------------------------------------------------
.. _faq2_5:
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?
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------
If you are running phpMyAdmin behind reverse proxy, please set the
:config:option:`$cfg['PmaAbsoluteUri']` directive in the phpMyAdmin
configuration file to match your setup.
.. _faq2_6:
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 :command:`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
:term:`TCP` connection.
.. _faqthemes:
To create a theme:
If you do not want to use your own symbols and buttons, remove the
directory "img" in "your\_theme\_name". phpMyAdmin will use the
default icons and buttons (from the system-theme ``pmahomme``).
.. _faqmissingparameters:
.. _faq2_9:
.. seealso:: :rfc:`1867`
.. _faqlimitations:
Known limitations
+++++++++++++++++
.. _login_bug:
3.1 When using HTTP authentication, a user who logged out can not log in again in
with the same nick.
-----------------------------------------------------------------------------------
------------------
.. _faq3_2:
3.2 When dumping a large table in compressed mode, I get a memory limit error or a
time limit error.
-----------------------------------------------------------------------------------
-----------------
Compressed dumps are built in memory and because of this are limited
to php's memory limit. For GZip/BZip2 exports this can be overcome
since 2.5.4 using :config:option:`$cfg['CompressOnFly']` (enabled by default).
Zip exports can not be handled this way, so if you need Zip files for larger
dump, you have to use another way.
.. _faq3_3:
3.3 With InnoDB tables, I lose foreign key relationships when I rename a table or a
column.
-----------------------------------------------------------------------------------
--------
.. _faq3_4:
3.4 I am unable to import dumps I created with the mysqldump tool bundled with the
MySQL server distribution.
-----------------------------------------------------------------------------------
--------------------------
.. code-block:: mysql
The invalid part of the code is the horizontal line made of dashes
that appears once in every dump created with mysqldump. If you want to
run your dump you have to turn it into valid MySQL. This means, you
have to add a whitespace after the first two dashes of the line or add
a # before it: ``-- -------------------------------------------------------`` or
``#---------------------------------------------------------``
.. _faq3_5:
3.5 When using nested folders, multiple hierarchies are displayed in a wrong
manner.
-----------------------------------------------------------------------------------
-
Please note that you should not use the separating string multiple
times without any characters between them, or at the beginning/end of
your table name. If you have to, think about using another
TableSeparator or disabling that feature.
.. seealso:: :config:option:`$cfg['NavigationTreeTableSeparator']`
.. _faq3_6:
3.6 (withdrawn).
-----------------
.. _faq3_7:
3.7 I have table with many (100+) columns and when I try to browse table I get
series of errors like "Warning: unable to parse url". How can this be fixed?
-----------------------------------------------------------------------------------
------------------------------------------------------------------------
Your table neither have a primary key nor an unique one, so we must
use a long expression to identify this row. This causes problems to
parse\_url function. The workaround is to create a primary or unique
key.
.. _faq3_8:
.. _faq3_9:
3.9 I get error messages when using "--sql\_mode=ANSI" for the MySQL server.
----------------------------------------------------------------------------
.. _faq3_10:
3.10 Homonyms and no primary key: When the results of a SELECT display more that
one column with the same value (for example ``SELECT lastname from employees where
firstname like 'A%'`` and two "Smith" values are displayed), if I click Edit I
cannot be sure that I am editing the intended row.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------------
Please make sure that your table has a primary key, so that phpMyAdmin
can use it for the Edit and Delete links.
.. _faq3_11:
phpMyAdmin uses a quick method to get the row count, and this method only
returns an approximate count in the case of InnoDB tables. See
:config:option:`$cfg['MaxExactCount']` for a way to modify those results, but
this could have a serious impact on performance.
However, one can easily replace the approximate row count with exact count by
simply clicking on the approximate count. This can also be done for all tables
at once by clicking on the rows sum displayed at the bottom.
.. _faq3_12:
3.12 (withdrawn).
-----------------
.. _faq3_13:
3.13 I get an error when entering ``USE`` followed by a db name containing an
hyphen.
-----------------------------------------------------------------------------------
--
The tests I have made with MySQL 5.1.49 shows that the API does not
accept this syntax for the USE command.
.. _faq3_14:
3.14 I am not able to browse a table when I don't have the right to SELECT one of
the columns.
-----------------------------------------------------------------------------------
-----------
This has been a known limitation of phpMyAdmin since the beginning and
it's not likely to be solved in the future.
.. _faq3_15:
3.15 (withdrawn).
-----------------
.. _faq3_16:
3.16 (withdrawn).
-----------------
.. _faq3_17:
3.17 (withdrawn).
-----------------
.. _faq3_18:
3.18 When I import a CSV file that contains multiple tables, they are lumped
together into a single table.
-----------------------------------------------------------------------------------
-----------------------
.. _faq3_19:
3.19 When I import a file and have phpMyAdmin determine the appropriate data
structure it only uses int, decimal, and varchar types.
-----------------------------------------------------------------------------------
-------------------------------------------------
.. _faq3_20:
3.20 After upgrading, some bookmarks are gone or their content cannot be shown.
-------------------------------------------------------------------------------
At some point, the character set used to store bookmark content has changed.
It's better to recreate your bookmark from the newer phpMyAdmin version.
.. _faqmultiuser:
.. _faq4_1:
4.1 I'm an ISP. Can I setup one central copy of phpMyAdmin or do I need to install
it for each customer?
-----------------------------------------------------------------------------------
---------------------
Since version 2.0.3, you can setup a central copy of phpMyAdmin for all your
users. The development of this feature was kindly sponsored by NetCologne GmbH.
This requires a properly setup MySQL user management and phpMyAdmin
:term:`HTTP` or cookie authentication.
.. seealso:: :ref:`authentication_modes`
.. _faq4_2:
4.2 What's the preferred way of making phpMyAdmin secure against evil access?
-----------------------------------------------------------------------------
Suggestions:
.. _faq4_3:
4.3 I get errors about not being able to include a file in */lang* or in
*/libraries*.
-----------------------------------------------------------------------------------
---
4.4 phpMyAdmin always gives "Access denied" when using HTTP authentication.
---------------------------------------------------------------------------
* :config:option:`$cfg['Servers'][$i]['controluser']` and/or
:config:option:`$cfg['Servers'][$i]['controlpass']` are wrong.
* The username/password you specify in the login dialog are invalid.
* You have already setup a security mechanism for the phpMyAdmin-
directory, eg. a :term:`.htaccess` file. This would interfere with phpMyAdmin's
authentication, so remove it.
.. _faq4_5:
Starting with 2.2.5, in the user management page, you can enter a
wildcard database name for a user (for example "joe%"), and put the
privileges you want. For example, adding ``SELECT, INSERT, UPDATE,
DELETE, CREATE, DROP, INDEX, ALTER`` would let a user create/manage
his/her database(s).
.. _faq4_6:
If you have existing rules from an old :term:`.htaccess` file, you can take them
and
add a username between the ``'deny'``/``'allow'`` and ``'from'``
strings. Using the username wildcard of ``'%'`` would be a major
benefit here if your installation is suited to using it. Then you can
just add those updated lines into the
:config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` array.
If you want a pre-made sample, you can try this fragment. It stops the
'root' user from logging in from any networks other than the private
network :term:`IP` blocks.
.. code-block:: php
.. _faq4_7:
.. _faq4_8:
4.8 Which parameters can I use in the URL that starts phpMyAdmin?
-----------------------------------------------------------------
.. _faqbrowsers:
Browsers or client OS
+++++++++++++++++++++
.. _faq5_1:
5.1 I get an out of memory error, and my controls are non-functional, when trying
to create a table with more than 14 columns.
-----------------------------------------------------------------------------------
-------------------------------------------
.. _faq5_2:
This is not a phpMyAdmin problem but a Xitami known bug: you'll face
it with each script/website that use forms. Upgrade or downgrade your
Xitami server.
.. _faq5_3:
With Konqueror 2.1.1: plain dumps, zip and GZip dumps work ok, except
that the proposed file name for the dump is always 'tbl\_dump.php'.
Bzip2 dumps don't seem to work. With Konqueror 2.2.1: plain dumps
work; zip dumps are placed into the user's temporary directory, so
they must be moved before closing Konqueror, or else they disappear.
GZip dumps give an error message. Testing needs to be done for
Konqueror 2.2.2.
.. _faq5_4:
5.4 I can't use the cookie authentication mode because Internet Explorer never
stores the cookies.
-----------------------------------------------------------------------------------
---------------
.. _faq5_5:
5.5 In Internet Explorer 5.0, I get JavaScript errors when browsing my rows.
----------------------------------------------------------------------------
.. _faq5_6:
5.6 In Internet Explorer 5.0, 5.5 or 6.0, I get an error (like "Page not found")
when trying to modify a row in a table with many columns, or with a text column.
-----------------------------------------------------------------------------------
------------------------------------------------------------------------------
Your table neither have a primary key nor an unique one, so we must use a long
:term:`URL` to identify this row. There is a limit on the length of the
:term:`URL` in those browsers, and this not happen in Netscape, for example.
The workaround is to create a primary or unique key, or use another browser.
.. _faq5_7:
5.7 I refresh (reload) my browser, and come back to the welcome page.
---------------------------------------------------------------------
.. _faq5_8:
5.8 With Mozilla 0.9.7 I have problems sending a query modified in the query box.
---------------------------------------------------------------------------------
Looks like a Mozilla bug: 0.9.6 was OK. We will keep an eye on future
Mozilla versions.
.. _faq5_9:
5.9 With Mozilla 0.9.? to 1.0 and Netscape 7.0-PR1 I can't type a whitespace in the
SQL-Query edit area: the page scrolls down.
-----------------------------------------------------------------------------------
--------------------------------------------
.. _faq5_10:
5.10 With Netscape 4.75 I get empty rows between each row of data in a CSV exported
file.
-----------------------------------------------------------------------------------
------
This is a known Netscape 4.75 bug: it adds some line feeds when
exporting data in octet-stream mode. Since we can't detect the
specific Netscape version, we cannot workaround this bug.
.. _faq5_11:
Please ensure that you have set your browser's character set to the
one of the language file you have selected on phpMyAdmin's start page.
Alternatively, you can try the auto detection mode that is supported
by the recent versions of the most browsers.
.. _faq5_12:
This issue has been reported by a :term:`Mac OS X` user, who adds that Chimera,
Netscape and Mozilla do not have this problem.
.. _faq5_13:
5.13 With Internet Explorer 5.5 or 6, and HTTP authentication type, I cannot manage
two servers: I log in to the first one, then the other one, but if I switch back to
the first, I have to log in on each operation.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------------------------------------------------
.. _faq5_14:
5.14 Using Opera6, I can manage to get to the authentication, but nothing happens
after that, only a blank screen.
-----------------------------------------------------------------------------------
-------------------------------
.. _faq5_15:
.. _faq5_16:
.. _faq5_17:
Many users have confirmed that the Tabbrowser Extensions plugin they
installed in their Firefox is causing the problem.
.. _faq5_18:
5.18 With Konqueror 4.2.x an invalid ``LIMIT`` clause is generated when I browse a
table.
-----------------------------------------------------------------------------------
------
This happens only when both of these conditions are met: using the
``http`` authentication mode and ``register_globals`` being set to
``On`` on the server. It seems to be a browser-specific problem;
meanwhile use the ``cookie`` authentication mode.
.. _faq5_19:
.. _faqusing:
Using phpMyAdmin
++++++++++++++++
.. _faq6_1:
6.1 I can't insert new rows into a table / I can't create a table - MySQL brings up
a SQL error.
-----------------------------------------------------------------------------------
-------------
.. _faq6_2:
6.2 When I create a table, I set an index for two columns and phpMyAdmin generates
only one index with those two columns.
-----------------------------------------------------------------------------------
--------------------------------------
.. _faq6_3:
Since version 2.2.3, you have a checkbox for each column that can be
null. Before 2.2.3, you had to enter "null", without the quotes, as
the column's value. Since version 2.5.5, you have to use the checkbox
to get a real NULL value, so if you enter "NULL" this means you want a
literal NULL in the column, and not a NULL value (this works in PHP4).
.. _faq6_4:
Click on a database or table name in the navigation panel, the properties will
be displayed. Then on the menu, click "Export", you can dump the structure, the
data, or both. This will generate standard :term:`SQL` statements that can be
used to recreate your database/table. You will need to choose "Save as file",
so that phpMyAdmin can transmit the resulting dump to your station. Depending
on your PHP configuration, you will see options to compress the dump. See also
the :config:option:`$cfg['ExecTimeLimit']` configuration variable. For
additional help on this subject, look for the word "dump" in this document.
.. _faq6_5:
6.5 How can I restore (upload) my database or table using a dump? How can I run a
".sql" file?
-----------------------------------------------------------------------------------
-----------
Note: For errors while importing of dumps exported from older MySQL versions to
newer MySQL versions,
please check :ref:`faq6_41`.
.. _faq6_6:
Here is an example with the tables persons, towns and countries, all
located in the database "mydb". If you don't have a ``pma__relation``
table, create it as explained in the configuration section. Then
create the example tables:
.. code-block:: mysql
.. _faqdisplay:
.. _faqpdf:
.. _faq6_9:
.. _underscore:
6.10 When creating a privilege, what happens with underscores in the database name?
-----------------------------------------------------------------------------------
.. _faq6_11:
It means "average".
.. _faqexport:
**Structure:**
* "Add DROP TABLE" will add a line telling MySQL to `drop the table
<https://dev.mysql.com/doc/mysql/en/drop-table.html>`_, if it already
exists during the import. It does NOT drop the table after your
export, it only affects the import file.
* "If Not Exists" will only create the table if it doesn't exist.
Otherwise, you may get an error if the table name exists but has a
different structure.
* "Add AUTO\_INCREMENT value" ensures that AUTO\_INCREMENT value (if
any) will be included in backup.
* "Enclose table and column names with backquotes" ensures that column
and table names formed with special characters are protected.
* "Add into comments" includes column comments, relations, and MIME
types set in the pmadb in the dump as :term:`SQL` comments
(*/\* xxx \*/*).
**Data:**
* "Complete inserts" adds the column names on every INSERT command, for
better documentation (but resulting file is bigger).
* "Extended inserts" provides a shorter dump file by using only once the
INSERT verb and the table name.
* "Delayed inserts" are best explained in the `MySQL manual - INSERT DELAYED Syntax
<https://dev.mysql.com/doc/mysql/en/insert-delayed.html>`_.
* "Ignore inserts" treats errors as a warning instead. Again, more info
is provided in the `MySQL manual - INSERT Syntax
<https://dev.mysql.com/doc/mysql/en/insert.html>`_, but basically with
this selected, invalid values are adjusted and inserted rather than
causing the entire statement to fail.
.. _faq6_13:
6.13 I would like to create a database with a dot in its name.
--------------------------------------------------------------
.. _faqsqlvalidator:
6.14 (withdrawn).
-----------------
.. _faq6_15:
6.15 I want to add a BLOB column and put an index on it, but MySQL says "BLOB
column '...' used in key specification without a key length".
-----------------------------------------------------------------------------------
--------------------------------------------------------
The right way to do this, is to create the column without any indexes,
then display the table structure and use the "Create an index" dialog.
On this page, you will be able to choose your BLOB column, and set a
size to the index, which is the condition to create an index on a BLOB
column.
.. _faq6_16:
6.16 How can I simply move in page with plenty editing fields?
--------------------------------------------------------------
.. _faq6_17:
6.17 Transformations: I can't enter my own mimetype! WTF is this feature then
useful for?
-----------------------------------------------------------------------------------
------
Plus, you have a whole overview of available mimetypes. Who knows all those
mimetypes by heart so he/she can enter it at will?
.. _faqbookmark:
6.18 Bookmarks: Where can I store bookmarks? Why can't I see any bookmarks below
the query box? What are these variables for?
-----------------------------------------------------------------------------------
------------------------------------------
Any query you have executed can be stored as a bookmark on the page
where the results are displayed. You will find a button labeled
'Bookmark this query' just at the end of the page. As soon as you have
stored a bookmark, it is related to the database you run the query on.
You can now access a bookmark dropdown on each page, the query box
appears on for that database.
You can also have, inside the query, placeholders for variables.
This is done by inserting into the query SQL comments between ``/*`` and
``*/``. Inside the comments, the special strings ``[VARIABLE{variable-number}]`` is
used.
Be aware that the whole query minus the SQL comments must be
valid by itself, otherwise you won't be able to store it as a bookmark.
When you execute the bookmark, everything typed into the *Variables*
input boxes on the query box page will replace the strings ``/*[VARIABLE{variable-
number}]*/`` in
your stored query.
.. code-block:: mysql
.. code-block:: mysql
, VARIABLE1 as myname
in your query, where VARIABLE1 is the string you entered in the Variable 1 input
box.
.. code-block:: mysql
SELECT Name, Address FROM addresses WHERE 1 /* AND Name LIKE '%[VARIABLE1]%' */
Say, you now enter "phpMyAdmin" as the variable for the stored query, the full
query will be:
.. code-block:: mysql
SELECT Name, Address FROM addresses WHERE 1 AND Name LIKE '%phpMyAdmin%'
**NOTE THE ABSENCE OF SPACES** inside the ``/**/`` construct. Any spaces
inserted there will be later also inserted as spaces in your query and may lead
to unexpected results especially when using the variable expansion inside of a
"LIKE ''" expression.
.. _faq6_19:
6.19 How can I create simple LATEX document to include exported table?
----------------------------------------------------------------------
.. code-block:: latex
.. _faq6_20:
6.20 I see a lot of databases which are not mine, and cannot access them.
-------------------------------------------------------------------------
You have one of these global privileges: CREATE TEMPORARY TABLES, SHOW
DATABASES, LOCK TABLES. Those privileges also enable users to see all the
database names. So if your users do not need those privileges, you can remove
them and their databases list will shorten.
.. seealso:: <https://bugs.mysql.com/179>
.. _faq6_21:
6.21 In edit/insert mode, how can I see a list of possible values for a column,
based on some foreign table?
-----------------------------------------------------------------------------------
-------------------------
You have to setup appropriate links between the tables, and also setup
the "display column" in the foreign table. See :ref:`faq6_6` for an
example. Then, if there are 100 values or less in the foreign table, a
drop-down list of values will be available. You will see two lists of
values, the first list containing the key and the display column, the
second list containing the display column and the key. The reason for
this is to be able to type the first letter of either the key or the
display column. For 100 values or more, a distinct window will appear,
to browse foreign key values and choose one. To change the default
limit of 100, see :config:option:`$cfg['ForeignKeyMaxLimit']`.
.. _faq6_22:
6.22 Bookmarks: Can I execute a default bookmark automatically when entering Browse
mode for a table?
-----------------------------------------------------------------------------------
------------------
Yes. If a bookmark has the same label as a table name and it's not a
public bookmark, it will be executed.
.. _faq6_23:
.. versionchanged:: 3.4.5
Since phpMyAdmin 3.4.5 support for direct export to Microsoft Excel version
97 and newer was dropped.
.. _faq6_24:
6.24 Now that phpMyAdmin supports native MySQL 4.1.x column comments, what happens
to my column comments stored in pmadb?
-----------------------------------------------------------------------------------
--------------------------------------
.. _faq6_25:
6.25 (withdrawn).
-----------------
.. _faq6_26:
Click the first row of the range, hold the shift key and click the
last row of the range. This works everywhere you see rows, for example
in Browse mode or on the Structure page.
.. _faq6_27:
In all places where phpMyAdmin accepts format strings, you can use
``@VARIABLE@`` expansion and `strftime <https://php.net/strftime>`_
format strings. The expanded variables depend on a context (for
example, if you haven't chosen a table, you can not get the table
name), but the following variables can be used:
``@HTTP_HOST@``
HTTP host that runs phpMyAdmin
``@SERVER@``
MySQL server name
``@VERBOSE@``
Verbose MySQL server name as defined in :config:option:`$cfg['Servers'][$i]
['verbose']`
``@VSERVER@``
Verbose MySQL server name if set, otherwise normal
``@DATABASE@``
Currently opened database
``@TABLE@``
Currently opened table
``@COLUMNS@``
Columns of the currently opened table
``@PHPMYADMIN@``
phpMyAdmin with version
.. _wysiwyg:
You have to click on the 'OK'-button below the tables to save the new
positions. If you want to place a new element, first add it to the
table of elements and then you can drag the new element around.
By changing the paper size and the orientation you can change the size
of the scratchboard as well. You can do so by just changing the
dropdown field below, and the scratchboard will resize automatically,
without interfering with the current placement of the elements.
If ever an element gets out of range you can either enlarge the paper
size or click on the 'reset' button to place all elements below each
other.
.. _faq6_29:
Not every table can be put to the chart. Only tables with one, two or
three columns can be visualised as a chart. Moreover the table must be
in a special format for chart script to understand it. Currently
supported formats can be found in the `wiki <https://wiki.phpmyadmin.ne
t/pma/Charts#Data_formats_for_query_results_chart>`_.
.. _faq6_30:
To upload these set of files you can use either of the following
methods:
Create a Zip archive with .shp and .dbf files and import it. For this
to work, you need to set :config:option:`$cfg['TempDir']` to a place where the web
server user can
write (for example ``'./tmp'``).
.. code-block:: sh
cd phpMyAdmin
mkdir tmp
chmod o+rwx tmp
.. _faq6_31:
.. _faq6_32:
.. _faq6_33:
6.33 When browsing a table, how can I copy a column name?
---------------------------------------------------------
Selecting the name of the column within the browse table header cell
for copying is difficult, as the columns support reordering by
dragging the header cells as well as sorting by clicking on the linked
column name. To copy a column name, double-click on the empty area
next to the column name, when the tooltip tells you to do so. This
will show you an input box with the column name. You may right-click
the column name within this input box to copy it to your clipboard.
.. _faq6_34:
To add a table to Favorite list simply click on the `Gray` star in front
of a table name in the list of tables of a Database and wait until it
turns to `Yellow`.
To remove a table from list, simply click on the `Yellow` star and
wait until it turns `Gray` again.
.. _faq6_35:
With the help of range search feature, one can specify a range of values for
particular column(s) while performing search operation on a table from the `Search`
tab.
To use this feature simply click on the `BETWEEN` or `NOT BETWEEN` operators
from the operator select list in front of the column name. On choosing one of the
above options, a dialog box will show up asking for the `Minimum` and `Maximum`
value for that column. Only the specified range of values will be included
in case of `BETWEEN` and excluded in case of `NOT BETWEEN` from the final results.
Note: The Range search feature will work only `Numeric` and `Date` data type
columns.
.. _faq6_36:
6.36 What is Central columns and How can I use this feature?
------------------------------------------------------------
As the name suggests, the Central columns feature enables to maintain a central
list of
columns per database to avoid similar name for the same data element and bring
consistency
of data type for the same data element. You can use the central list of columns to
add an element to any table structure in that database which will save from writing
similar column name and column definition.
To add a column to central list, go to table structure page, check the columns you
want
to include and then simply click on "Add to central columns". If you want to add
all
unique columns from more than one table from a database then go to database
structure page,
check the tables you want to include and then select "Add columns to central list".
To remove a column from central list, go to Table structure page, check the columns
you want
to remove and then simply click on "Remove from central columns". If you want to
remove all
columns from more than one tables from a database then go to database structure
page,
check the tables you want to include and then select "Remove columns from central
list".
To view and manage the central list, select the database you want to manage central
columns
for then from the top menu click on "Central columns". You will be taken to a page
where
you will have options to edit, delete or add new columns to central list.
.. _faq6_37:
Improve table structure feature helps to bring the table structure upto
Third Normal Form. A wizard is presented to user which asks questions about the
elements during the various steps for normalization and a new structure is proposed
accordingly to bring the table into the First/Second/Third Normal form.
On startup of the wizard, user gets to select upto what normal form they want to
normalize the table structure.
Here is an example table which you can use to test all of the three First, Second
and
Third Normal Form.
.. code-block:: mysql
The above table is not in First normal Form as no primary key exists. Primary key
is supposed to be (`petName`,`ownerLastName`,`ownerFirstName`) . If the primary key
is chosen as suggested the resultant table won't be in Second as well as Third
Normal
form as the following dependencies exists.
.. code-block:: mysql
.. _faq6_38:
Here are the steps to accomplish this. These are manual steps because they
involve a manual verification at one point.
* On your primary key column (i.e. id), remove the AUTO_INCREMENT setting
* Browse your table and verify that the new increments correspond to what
you're expecting
.. _faq6_39:
6.39 What is the "Adjust privileges" option when renaming, copying, or moving a
database, table, column, or procedure?
-----------------------------------------------------------------------------------
-----------------------------------
Notes:
* While adjusting privileges, the user performing the operation **must** have the
following
privileges:
.. _faq6_40:
6.40 I see "Bind parameters" checkbox in the "SQL" page. How do I write
parameterized SQL queries?
-----------------------------------------------------------------------------------
---------------
From version 4.5, phpMyAdmin allows users to execute parameterized queries in the
"SQL" page.
Parameters should be prefixed with a colon(:) and when the "Bind parameters"
checkbox is checked
these parameters will be identified and input fields for these parameters will be
presented.
Values entered in these field will be substituted in the query before being
executed.
.. _faq6_41:
6.41 I get import errors while importing the dumps exported from older MySQL
versions (pre-5.7.6) into newer MySQL versions (5.7.7+), but they work fine when
imported back on same older versions ?
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------
If you get errors like *#1031 - Table storage engine for 'table_name' doesn't have
this option*
while importing the dumps exported from pre-5.7.7 MySQL servers into new MySQL
server versions 5.7.7+,
it might be because ROW_FORMAT=FIXED is not supported with InnoDB tables. Moreover,
the value of
`innodb_strict_mode <http://dev.mysql.com/doc/refman/5.7/en/innodb-
parameters.html#sysvar_innodb_strict_mode>`_ would define if this would be reported
as a warning or as an error.
Since MySQL version 5.7.9, the default value for `innodb_strict_mode` is `ON` and
thus would generate
an error when such a CREATE TABLE or ALTER TABLE statement is encountered.
* Change the value of `innodb_strict_mode` to `OFF` before starting the import and
turn it `ON` after
the import is successfully completed.
* This can be achieved in two ways:
.. _faqproject:
phpMyAdmin project
++++++++++++++++++
.. _faq7_1:
.. _faq7_2:
Translations are very welcome and all you need to have are the
language skills. The easiest way is to use our `online translation
service <https://hosted.weblate.org/projects/phpmyadmin/>`_. You can check
out all the possibilities to translate in the `translate section on
our website <https://www.phpmyadmin.net/translate/>`_.
.. _faq7_3:
7.3 I would like to help out with the development of phpMyAdmin. How should I
proceed?
-----------------------------------------------------------------------------------
---
.. _faqsecurity:
Security
++++++++
.. _faq8_1:
8.1 Where can I get information about the security alerts issued for phpMyAdmin?
--------------------------------------------------------------------------------
.. _faq8_2:
``userID``
User name of currently active user (he does not have to be logged in).
``userStatus``
Status of currently active user, one of ``ok`` (user is logged in),
``mysql-denied`` (MySQL denied user login), ``allow-denied`` (user denied
by allow/deny rules), ``root-denied`` (root is denied in configuration),
``empty-denied`` (empty password is denied).
.. code-block:: apache
You can then use any log analyzing tools to detect possible break-in
attempts.
.. _faq8_3:
8.3 Why are there path disclosures when directly loading certain files?
-----------------------------------------------------------------------
.. _faqsynchronization:
Synchronization
+++++++++++++++
.. _faq9_1:
9.1 (withdrawn).
----------------
.. _faq9_2:
9.2 (withdrawn).
----------------