Translated using Weblate (Portuguese)
[phpmyadmin.git] / docs / faq.rst
blob42a9ea2d3d503985626fb3f5fe73ad7d90b8777a
1 .. _faq:
3 FAQ - Frequently Asked Questions
4 ================================
6 Please have a look at our `Link section
7 <https://www.phpmyadmin.net/docs/>`_ on the official
8 phpMyAdmin homepage for in-depth coverage of phpMyAdmin's features and
9 or interface.
11 .. _faqserver:
13 Server
14 ++++++
16 .. _faq1_1:
18 1.1 My server is crashing each time a specific action is required or phpMyAdmin sends a blank page or a page full of cryptic characters to my browser, what can I do?
19 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
21 Try to set the :config:option:`$cfg['OBGzip']` directive to ``false`` in your
22 :file:`config.inc.php` file and the ``zlib.output_compression`` directive to
23 ``Off`` in your php configuration file.
25 .. _faq1_2:
27 1.2 My Apache server crashes when using phpMyAdmin.
28 ---------------------------------------------------
30 You should first try the latest versions of Apache (and possibly MySQL). If
31 your server keeps crashing, please ask for help in the various Apache support
32 groups.
34 .. seealso:: :ref:`faq1_1`
36 .. _faq1_3:
38 1.3 (withdrawn).
39 ----------------
41 .. _faq1_4:
43 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 ...".
44 -------------------------------------------------------------------------------------------------------------------------------------------------------------
46 You just forgot to read the *install.txt* file from the PHP
47 distribution. Have a look at the last message in this `PHP bug report #12061
48 <https://bugs.php.net/bug.php?id=12061>`_ from the official PHP bug
49 database.
51 .. _faq1_5:
53 1.5 Using phpMyAdmin on IIS, I'm facing crashes and/or many error messages with the HTTP.
54 -----------------------------------------------------------------------------------------
56 This is a known problem with the PHP :term:`ISAPI` filter: it's not so stable.
57 Please use instead the cookie authentication mode.
59 .. _faq1_6:
61 1.6 I can't use phpMyAdmin on PWS: nothing is displayed!
62 --------------------------------------------------------
64 This seems to be a PWS bug. Filippo Simoncini found a workaround (at
65 this time there is no better fix): remove or comment the ``DOCTYPE``
66 declarations (2 lines) from the scripts :file:`src/Header.php`
67 and :file:`index.php`.
69 .. _faq1_7:
71 1.7 How can I gzip a dump or a CSV export? It does not seem to work.
72 --------------------------------------------------------------------
74 This feature is based on the ``gzencode()``
75 PHP function to be more independent of the platform (Unix/Windows,
76 Safe Mode or not, and so on). So, you must have Zlib support
77 (``--with-zlib``).
79 .. _faq1_8:
81 1.8 I cannot insert a text file in a table, and I get an error about safe mode being in effect.
82 -----------------------------------------------------------------------------------------------
84 Your uploaded file is saved by PHP in the "upload dir", as defined in
85 :file:`php.ini` by the variable ``upload_tmp_dir`` (usually the system
86 default is */tmp*). We recommend the following setup for Apache
87 servers running in safe mode, to enable uploads of files while being
88 reasonably secure:
90 * create a separate directory for uploads: :command:`mkdir /tmp/php`
91 * give ownership to the Apache server's user.group: :command:`chown
92   apache.apache /tmp/php`
93 * give proper permission: :command:`chmod 600 /tmp/php`
94 * put ``upload_tmp_dir = /tmp/php`` in :file:`php.ini`
95 * restart Apache
97 .. _faq1_9:
99 1.9 (withdrawn).
100 ----------------
102 .. _faq1_10:
104 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.
105 ----------------------------------------------------------------------------------------------------------------------------------------------------------
107 As suggested by "Rob M" in the phpWizard forum, add this line to your
108 *httpd.conf*:
110 .. code-block:: apache
112     SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
114 It seems to clear up many problems between Internet Explorer and SSL.
116 .. _faq1_11:
118 1.11 I get an 'open\_basedir restriction' while uploading a file from the import tab.
119 -------------------------------------------------------------------------------------
121 Since version 2.2.4, phpMyAdmin supports servers with open\_basedir
122 restrictions. However you need to create temporary directory and configure it
123 as :config:option:`$cfg['TempDir']`. The uploaded files will be moved there,
124 and after execution of your :term:`SQL` commands, removed.
126 .. _faq1_12:
128 1.12 I have lost my MySQL root password, what can I do?
129 -------------------------------------------------------
131 phpMyAdmin does authenticate against MySQL server you're using, so to recover
132 from phpMyAdmin password loss, you need to recover at MySQL level.
134 The MySQL manual explains how to `reset the permissions
135 <https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html>`_.
137 If you are using MySQL server installed by your hosting provider, please
138 contact their support to recover the password for you.
140 .. _faq1_13:
142 1.13 (withdrawn).
143 -----------------
145 .. _faq1_14:
147 1.14 (withdrawn).
148 -----------------
150 .. _faq1_15:
152 1.15 I have problems with *mysql.user* column names.
153 ----------------------------------------------------
155 In previous MySQL versions, the ``User`` and ``Password`` columns were
156 named ``user`` and ``password``. Please modify your column names to
157 align with current standards.
159 .. _faq1_16:
161 1.16 I cannot upload big dump files (memory, HTTP or timeout problems).
162 -----------------------------------------------------------------------
164 Starting with version 2.7.0, the import engine has been re–written and
165 these problems should not occur. If possible, upgrade your phpMyAdmin
166 to the latest version to take advantage of the new import features.
168 The first things to check (or ask your host provider to check) are the values
169 of ``max_execution_time``, ``upload_max_filesize``, ``memory_limit`` and
170 ``post_max_size`` in the :file:`php.ini` configuration file. All of these
171 settings limit the maximum size of data that can be submitted and handled by
172 PHP. Please note that ``post_max_size`` needs to be larger than
173 ``upload_max_filesize``. There exist several workarounds if your upload is too
174 big or your hosting provider is unwilling to change the settings:
176 * Look at the :config:option:`$cfg['UploadDir']` feature. This allows one to upload a file to the server
177   via scp, FTP, or your favorite file transfer method. PhpMyAdmin is
178   then able to import the files from the temporary directory. More
179   information is available in the :ref:`config`  of this document.
180 * Using a utility (such as `BigDump
181   <https://www.ozerov.de/bigdump/>`_) to split the files before
182   uploading. We cannot support this or any third party applications, but
183   are aware of users having success with it.
184 * If you have shell (command line) access, use MySQL to import the files
185   directly. You can do this by issuing the "source" command from within
186   MySQL:
188   .. code-block:: mysql
190     source filename.sql;
192 .. _faq1_17:
194 1.17 Which Database versions does phpMyAdmin support?
195 -----------------------------------------------------
197 For `MySQL <https://www.mysql.com/>`_, versions 5.5 and newer are supported.
198 For older MySQL versions, our `Downloads <https://www.phpmyadmin.net/downloads/>`_ page offers older phpMyAdmin versions
199 (which may have become unsupported).
201 For `MariaDB <https://mariadb.org/>`_, versions 5.5 and newer are supported.
203 .. _faq1_17a:
205 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"
206 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
208 You tried to access MySQL with an old MySQL client library. The
209 version of your MySQL client library can be checked in your phpinfo()
210 output. In general, it should have at least the same minor version as
211 your server - as mentioned in :ref:`faq1_17`. This problem is
212 generally caused by using MySQL version 4.1 or newer. MySQL changed
213 the authentication hash and your PHP is trying to use the old method.
214 The proper solution is to use the `mysqli extension
215 <https://www.php.net/mysqli>`_ with the proper client library to match
216 your MySQL installation. More
217 information (and several workarounds) are located in the `MySQL
218 Documentation <https://dev.mysql.com/doc/refman/5.7/en/common-errors.html>`_.
220 .. _faq1_18:
222 1.18 (withdrawn).
223 -----------------
225 .. _faq1_19:
227 1.19 I can't run the "display relations" feature because the script seems not to know the font face I'm using!
228 --------------------------------------------------------------------------------------------------------------
230 The :term:`TCPDF` library we're using for this feature requires some special
231 files to use font faces. Please refers to the `TCPDF manual
232 <https://tcpdf.org/>`_ to build these files.
234 .. _faqmysql:
236 1.20 I receive an error about missing mysqli and mysql extensions.
237 ------------------------------------------------------------------
239 To connect to a MySQL server, PHP needs a set of MySQL functions
240 called "MySQL extension". This extension may be part of the PHP
241 distribution (compiled-in), otherwise it needs to be loaded
242 dynamically. Its name is probably *mysqli.so* or *php\_mysqli.dll*.
243 phpMyAdmin tried to load the extension but failed. Usually, the
244 problem is solved by installing a software package called "PHP-MySQL"
245 or something similar.
247 There was two interfaces PHP provided as MySQL extensions - ``mysql``
248 and ``mysqli``. The ``mysql`` interface was removed in PHP 7.0.
250 This problem can be also caused by wrong paths in the :file:`php.ini` or using
251 wrong :file:`php.ini`.
253 Make sure that the extension files do exist in the folder which the
254 ``extension_dir`` points to and that the corresponding lines in your
255 :file:`php.ini` are not commented out (you can use ``phpinfo()`` to check
256 current setup):
258 .. code-block:: ini
260     [PHP]
262     ; Directory in which the loadable extensions (modules) reside.
263     extension_dir = "C:/Apache2/modules/php/ext"
265 The :file:`php.ini` can be loaded from several locations (especially on
266 Windows), so please check you're updating the correct one. If using Apache, you
267 can tell it to use specific path for this file using ``PHPIniDir`` directive:
269 .. code-block:: apache
271     LoadModule php7_module "C:/php7/php7apache2_4.dll"
272     <IfModule php7_module>
273         PHPIniDir "C:/php7"
274         <Location>
275            AddType text/html .php
276            AddHandler application/x-httpd-php .php
277         </Location>
278     </IfModule>
280 In some rare cases this problem can be also caused by other extensions loaded
281 in PHP which prevent MySQL extensions to be loaded. If anything else fails, you
282 can try commenting out extensions for other databases from :file:`php.ini`.
284 .. _faq1_21:
286 1.21 I am running the CGI version of PHP under Unix, and I cannot log in using cookie auth.
287 -------------------------------------------------------------------------------------------
289 In :file:`php.ini`, set ``mysql.max_links`` higher than 1.
291 .. _faq1_22:
293 1.22 I don't see the "Location of text file" field, so I cannot upload.
294 -----------------------------------------------------------------------
296 This is most likely because in :file:`php.ini`, your ``file_uploads``
297 parameter is not set to "on".
299 .. _faq1_23:
301 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!
302 ------------------------------------------------------------------------------------------------------------------------------
304 This happens because the MySQL directive ``lower_case_table_names``
305 defaults to 1 (``ON``) in the Win32 version of MySQL. You can change
306 this behavior by simply changing the directive to 0 (``OFF``): Just
307 edit your ``my.ini`` file that should be located in your Windows
308 directory and add the following line to the group [mysqld]:
310 .. code-block:: ini
312     set-variable = lower_case_table_names=0
314 .. note::
316     Forcing this variable to 0 with --lower-case-table-names=0 on a
317     case-insensitive filesystem and access MyISAM tablenames using different
318     lettercases, index corruption may result.
320 Next, save the file and restart the MySQL service. You can always
321 check the value of this directive using the query
323 .. code-block:: mysql
325     SHOW VARIABLES LIKE 'lower_case_table_names';
327 .. seealso:: `Identifier Case Sensitivity in the MySQL Reference Manual <https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html>`_
329 .. _faq1_24:
331 1.24 (withdrawn).
332 -----------------
334 .. _faq1_25:
336 1.25 I am running Apache with mod\_gzip-1.3.26.1a on Windows XP, and I get problems, such as undefined variables when I run a SQL query.
337 ----------------------------------------------------------------------------------------------------------------------------------------
339 A tip from Jose Fandos: put a comment on the following two lines in
340 httpd.conf, like this:
342 .. code-block:: apache
344     # mod_gzip_item_include file \.php$
345     # mod_gzip_item_include mime "application/x-httpd-php.*"
347 as this version of mod\_gzip on Apache (Windows) has problems handling
348 PHP scripts. Of course you have to restart Apache.
350 .. _faq1_26:
352 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.
353 ----------------------------------------------------------------------------------------------------------------------------------------
355 This is a permission problem. Right-click on the phpmyadmin folder and
356 choose properties. Under the tab Security, click on "Add" and select
357 the user "IUSR\_machine" from the list. Now set their permissions and it
358 should work.
360 .. _faq1_27:
362 1.27 I get empty page when I want to view huge page (eg. db\_structure.php with plenty of tables).
363 --------------------------------------------------------------------------------------------------
365 This was caused by a `PHP bug <https://bugs.php.net/bug.php?id=21079>`_ that occur when
366 GZIP output buffering is enabled. If you turn off it (by
367 :config:option:`$cfg['OBGzip']` in :file:`config.inc.php`), it should work.
368 This bug will has been fixed in PHP 5.0.0.
370 .. _faq1_28:
372 1.28 My MySQL server sometimes refuses queries and returns the message 'Errorcode: 13'. What does this mean?
373 ------------------------------------------------------------------------------------------------------------
375 This can happen due to a MySQL bug when having database / table names
376 with upper case characters although ``lower_case_table_names`` is
377 set to 1. To fix this, turn off this directive, convert all database
378 and table names to lower case and turn it on again. Alternatively,
379 there's a bug-fix available starting with MySQL 3.23.56 /
380 4.0.11-gamma.
382 .. _faq1_29:
384 1.29 When I create a table or modify a column, I get an error and the columns are duplicated.
385 ---------------------------------------------------------------------------------------------
387 It is possible to configure Apache in such a way that PHP has problems
388 interpreting .php files.
390 The problems occur when two different (and conflicting) set of
391 directives are used:
393 .. code-block:: apache
395     SetOutputFilter PHP
396     SetInputFilter PHP
400 .. code-block:: apache
402     AddType application/x-httpd-php .php
404 In the case we saw, one set of directives was in
405 ``/etc/httpd/conf/httpd.conf``, while the other set was in
406 ``/etc/httpd/conf/addon-modules/php.conf``. The recommended way is
407 with ``AddType``, so just comment out the first set of lines and
408 restart Apache:
410 .. code-block:: apache
412     #SetOutputFilter PHP
413     #SetInputFilter PHP
415 .. _faq1_30:
417 1.30 I get the error "navigation.php: Missing hash".
418 ----------------------------------------------------
420 This problem is known to happen when the server is running Turck
421 MMCache but upgrading MMCache to version 2.3.21 solves the problem.
423 .. _faq1_31:
425 1.31 Which PHP versions does phpMyAdmin support?
426 ------------------------------------------------
428 Since release 4.5, phpMyAdmin supports only PHP 5.5 and newer. Since release
429 4.1 phpMyAdmin supports only PHP 5.3 and newer. For PHP 5.2 you can use 4.0.x
430 releases.
432 PHP 7 is supported since phpMyAdmin 4.6, PHP 7.1 is supported since 4.6.5,
433 PHP 7.2 is supported since 4.7.4.
435 HHVM is supported up to phpMyAdmin 4.8.
437 Since release 5.0, phpMyAdmin supports only PHP 7.1 and newer.
438 Since release 5.2, phpMyAdmin supports only PHP 7.2 and newer.
439 Since release 6.0, phpMyAdmin supports only PHP 8.1 and newer.
441 .. _faq1_32:
443 1.32 Can I use HTTP authentication with IIS?
444 --------------------------------------------
446 Yes. This procedure was tested with phpMyAdmin 2.6.1, PHP 4.3.9 in
447 :term:`ISAPI` mode under :term:`IIS` 5.1.
449 #. In your :file:`php.ini` file, set ``cgi.rfc2616_headers = 0``
450 #. In ``Web Site Properties -> File/Directory Security -> Anonymous
451    Access`` dialog box, check the ``Anonymous access`` checkbox and
452    uncheck any other checkboxes (i.e. uncheck ``Basic authentication``,
453    ``Integrated Windows authentication``, and ``Digest`` if it's
454    enabled.) Click ``OK``.
455 #. In ``Custom Errors``, select the range of ``401;1`` through ``401;5``
456    and click the ``Set to Default`` button.
458 .. seealso:: :rfc:`2616`
460 .. _faq1_33:
462 1.33 (withdrawn).
463 -----------------
465 .. _faq1_34:
467 1.34 Can I directly access a database or table pages?
468 -----------------------------------------------------
470 Yes. Out of the box, you can use a :term:`URL` like
471 ``http://server/phpMyAdmin/index.php?server=X&db=database&table=table&target=script``.
472 For ``server`` you can use the server number
473 which refers to the numeric host index (from ``$i``) in
474 :file:`config.inc.php`. The table and script parts are optional.
476 If you want a URL like
477 ``http://server/phpMyAdmin/database[/table][/script]``, you need to do some additional configuration. The following
478 lines apply only for the `Apache <https://httpd.apache.org>`_ web server.
479 First, make sure that you have enabled some features within the Apache global
480 configuration. You need ``Options SymLinksIfOwnerMatch`` and ``AllowOverride
481 FileInfo`` enabled for directory where phpMyAdmin is installed and you
482 need mod\_rewrite to be enabled. Then you just need to create the
483 following :term:`.htaccess` file in root folder of phpMyAdmin installation (don't
484 forget to change directory name inside of it):
486 .. code-block:: apache
488     RewriteEngine On
489     RewriteBase /path_to_phpMyAdmin
490     RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&table=$2&target=$3 [R]
491     RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
492     RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
493     RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
495 .. seealso:: :ref:`faq4_8`
497 .. versionchanged:: 5.1.0
499     Support for using the ``target`` parameter was removed in phpMyAdmin 5.1.0.
500     Use the ``route`` parameter instead.
502 .. _faq1_35:
504 1.35 Can I use HTTP authentication with Apache CGI?
505 ---------------------------------------------------
507 Yes. However you need to pass authentication variable to :term:`CGI` using
508 following rewrite rule:
510 .. code-block:: apache
512     RewriteEngine On
513     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
515 .. _faq1_36:
517 1.36 I get an error "500 Internal Server Error".
518 ------------------------------------------------
520 There can be many explanations to this and a look at your server's
521 error log file might give a clue.
523 .. _faq1_37:
525 1.37 I run phpMyAdmin on cluster of different machines and password encryption in cookie auth doesn't work.
526 -----------------------------------------------------------------------------------------------------------
528 If your cluster consist of different architectures, PHP code used for
529 encryption/decryption won't work correctly. This is caused by use of
530 pack/unpack functions in code. Only solution is to use openssl
531 extension which works fine in this case.
533 .. _faq1_38:
535 1.38 Can I use phpMyAdmin on a server on which Suhosin is enabled?
536 ------------------------------------------------------------------
538 Yes but the default configuration values of Suhosin are known to cause
539 problems with some operations, for example editing a table with many
540 columns and no :term:`primary key` or with textual :term:`primary key`.
542 Suhosin configuration might lead to malfunction in some cases and it
543 can not be fully avoided as phpMyAdmin is kind of application which
544 needs to transfer big amounts of columns in single HTTP request, what
545 is something what Suhosin tries to prevent. Generally all
546 ``suhosin.request.*``, ``suhosin.post.*`` and ``suhosin.get.*``
547 directives can have negative effect on phpMyAdmin usability. You can
548 always find in your error logs which limit did cause dropping of
549 variable, so you can diagnose the problem and adjust matching
550 configuration variable.
552 The default values for most Suhosin configuration options will work in
553 most scenarios, however you might want to adjust at least following
554 parameters:
556 * `suhosin.request.max\_vars <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-request-max-vars>`_ should
557   be increased (eg. 2048)
558 * `suhosin.post.max\_vars <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-post-max-vars>`_ should be
559   increased (eg. 2048)
560 * `suhosin.request.max\_array\_index\_length <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-request-max-array-index-length>`_
561   should be increased (eg. 256)
562 * `suhosin.post.max\_array\_index\_length <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-post-max-array-index-length>`_
563   should be increased (eg. 256)
564 * `suhosin.request.max\_totalname\_length <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-request-max-totalname-length>`_
565   should be increased (eg. 8192)
566 * `suhosin.post.max\_totalname\_length <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-post-max-totalname-length>`_ should be
567   increased (eg. 8192)
568 * `suhosin.get.max\_value\_length <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-get-max-value-length>`_
569   should be increased (eg. 1024)
570 * `suhosin.sql.bailout\_on\_error <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-sql-bailout-on-error>`_
571   needs to be disabled (the default)
572 * `suhosin.log.\* <https://suhosin5.suhosin.org/stories/configuration.html#logging-configuration>`_ should not
573   include :term:`SQL`, otherwise you get big
574   slowdown
575 * `suhosin.sql.union <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-
576   sql-union>`_ must be disabled (which is the default).
577 * `suhosin.sql.multiselect <https://suhosin5.suhosin.org/stories/configuration.html#
578   suhosin-sql-multiselect>`_ must be disabled (which is the default).
579 * `suhosin.sql.comment <https://suhosin5.suhosin.org/stories/configuration.html#suhosin-
580   sql-comment>`_ must be disabled (which is the default).
582 To further improve security, we also recommend these modifications:
584 * `suhosin.executor.include.max\_traversal <https://suhosin5.suhosin.org/stories/
585   configuration.html#suhosin-executor-include-max-traversal>`_ should be
586   enabled as a mitigation against local file inclusion attacks. We suggest
587   setting this to 2 as ``../`` is used with the ReCaptcha library.
588 * `suhosin.cookie.encrypt <https://suhosin5.suhosin.org/stories/configuration.html#
589   suhosin-cookie-encrypt>`_ should be enabled.
590 * `suhosin.executor.disable_emodifier <https://suhosin5.suhosin.org/stories/config
591   uration.html#suhosin-executor-disable-emodifier>`_ should be enabled.
593 You can also disable the warning using the :config:option:`$cfg['SuhosinDisableWarning']`.
595 .. _faq1_39:
597 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?
598 ------------------------------------------------------------------------------------------------------------------------------------
600 This is caused by the fact that PHP scripts have no knowledge that the site is
601 using https. Depending on used webserver, you should configure it to let PHP
602 know about URL and scheme used to access it.
604 For example in Apache ensure that you have enabled ``SSLOptions`` and
605 ``StdEnvVars`` in the configuration.
607 .. seealso:: <https://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
609 .. _faq1_40:
611 1.40 When accessing phpMyAdmin via an Apache reverse proxy, cookie login does not work.
612 ---------------------------------------------------------------------------------------
614 To be able to use cookie auth Apache must know that it has to rewrite
615 the set-cookie headers. Example from the Apache 2.2 documentation:
617 .. code-block:: apache
619     ProxyPass /mirror/foo/ http://backend.example.com/
620     ProxyPassReverse /mirror/foo/ http://backend.example.com/
621     ProxyPassReverseCookieDomain backend.example.com public.example.com
622     ProxyPassReverseCookiePath / /mirror/foo/
624 Note: if the backend url looks like ``http://server/~user/phpmyadmin``, the
625 tilde (~) must be url encoded as %7E in the ProxyPassReverse\* lines.
626 This is not specific to phpmyadmin, it's just the behavior of Apache.
628 .. code-block:: apache
630     ProxyPass /mirror/foo/ http://backend.example.com/~user/phpmyadmin
631     ProxyPassReverse /mirror/foo/ http://backend.example.com/%7Euser/phpmyadmin
632     ProxyPassReverseCookiePath /%7Euser/phpmyadmin /mirror/foo
634 .. seealso:: <https://httpd.apache.org/docs/2.2/mod/mod_proxy.html>, :config:option:`$cfg['PmaAbsoluteUri']`
636 .. _faq1_41:
638 1.41 When I view a database and ask to see its privileges, I get an error about an unknown column.
639 --------------------------------------------------------------------------------------------------
641 The MySQL server's privilege tables are not up to date, you need to
642 run the :command:`mysql_upgrade` command on the server.
644 .. _faq1_42:
646 1.42 How can I prevent robots from accessing phpMyAdmin?
647 --------------------------------------------------------
649 You can add various rules to :term:`.htaccess` to filter access based on user agent
650 field. This is quite easy to circumvent, but could prevent at least
651 some robots accessing your installation.
653 .. code-block:: apache
655     RewriteEngine on
657     # Allow only GET and POST verbs
658     RewriteCond %{REQUEST_METHOD} !^(GET|POST)$ [NC,OR]
660     # Ban Typical Vulnerability Scanners and others
661     # Kick out Script Kiddies
662     RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
663     RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).* [NC,OR]
664     RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
666     # Ban Search Engines, Crawlers to your administrative panel
667     # No reasons to access from bots
668     # Ultimately Better than the useless robots.txt
669     # Did google respect robots.txt?
670     # Try google: intitle:phpMyAdmin intext:"Welcome to phpMyAdmin *.*.*" intext:"Log in" -wiki -forum -forums -questions intext:"Cookies must be enabled"
671     RewriteCond %{HTTP_USER_AGENT} ^.*(AdsBot-Google|ia_archiver|Scooter|Ask.Jeeves|Baiduspider|Exabot|FAST.Enterprise.Crawler|FAST-WebCrawler|www\.neomo\.de|Gigabot|Mediapartners-Google|Google.Desktop|Feedfetcher-Google|Googlebot|heise-IT-Markt-Crawler|heritrix|ibm.com\cs/crawler|ICCrawler|ichiro|MJ12bot|MetagerBot|msnbot-NewsBlogs|msnbot|msnbot-media|NG-Search|lucene.apache.org|NutchCVS|OmniExplorer_Bot|online.link.validator|psbot0|Seekbot|Sensis.Web.Crawler|SEO.search.Crawler|Seoma.\[SEO.Crawler\]|SEOsearch|Snappy|www.urltrends.com|www.tkl.iis.u-tokyo.ac.jp/~crawler|SynooBot|crawleradmin.t-info@telekom.de|TurnitinBot|voyager|W3.SiteSearch.Crawler|W3C-checklink|W3C_Validator|www.WISEnutbot.com|yacybot|Yahoo-MMCrawler|Yahoo\!.DE.Slurp|Yahoo\!.Slurp|YahooSeeker).* [NC]
672     RewriteRule .* - [F]
674 .. _faq1_43:
676 1.43 Why can't I display the structure of my table containing hundreds of columns?
677 ----------------------------------------------------------------------------------
679 Because your PHP's ``memory_limit`` is too low; adjust it in :file:`php.ini`.
681 .. _faq1:44:
683 1.44 How can I reduce the installed size of phpMyAdmin on disk?
684 ---------------------------------------------------------------
686 Some users have requested to be able to reduce the size of the phpMyAdmin installation.
687 This is not recommended and could lead to confusion over missing features, but can be done.
688 A list of files and corresponding functionality which degrade gracefully when removed include:
690 * :file:`./resources/locale/` folder, or unused subfolders (interface translations)
691 * Any unused themes in :file:`./public/themes/` except the default theme `pmahomme`.
692 * :file:`./app/language_stats.inc.php` (translation statistics)
693 * :file:`./docs/` (documentation)
694 * :file:`./setup/` (setup script)
695 * :file:`./examples/` (configuration examples)
696 * :file:`./resources/sql/` (SQL scripts to configure advanced functionalities)
697 * :file:`./resources/js/src/` (Source files to re-build `./public/js/dist/`)
698 * :file:`./resources/js/global.d.ts` JS type declaration file
699 * Run `rm -rv vendor/tecnickcom/tcpdf && composer dump-autoload --no-interaction --optimize --dev` (exporting to PDF)
700 * Run `rm -rv vendor/williamdes/mariadb-mysql-kbs && composer dump-autoload --no-interaction --optimize --dev` (external links to MariaDB and MySQL documentations)
701 * Run `rm -rv vendor/code-lts/u2f-php-server && composer dump-autoload --no-interaction --optimize --dev` (U2F second factor authentication)
702 * Run `rm -rv vendor/pragmarx/* && composer dump-autoload --no-interaction --optimize --dev` (2FA second factor authentication)
703 * Run `rm -rv vendor/bacon/bacon-qr-code && composer dump-autoload --no-interaction --optimize --dev` (QRcode generation for 2FA second factor authentication)
705 .. _faq1_45:
707 1.45 I get an error message about unknown authentication method caching_sha2_password when trying to log in
708 -----------------------------------------------------------------------------------------------------------
710 When logging in using MySQL version 8 or newer, you may encounter an error message like this:
712     mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
714     mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
716 This error is because of a version compatibility problem between PHP and MySQL. The MySQL project introduced a new authentication
717 method (our tests show this began with version 8.0.11) however PHP did not include the ability to use that authentication method.
718 PHP reports that this was fixed in PHP version 7.4.
720 Users experiencing this are encouraged to upgrade their PHP installation, however a workaround exists. Your MySQL user account
721 can be set to use the older authentication with a command such as
723 .. code-block:: mysql
725   ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
727 .. seealso:: <https://github.com/phpmyadmin/phpmyadmin/issues/14220>, <https://stackoverflow.com/questions/49948350/phpmyadmin-on-mysql-8-0>, <https://bugs.php.net/bug.php?id=76243>
729 .. _faqconfig:
731 Configuration
732 +++++++++++++
734 .. _faq2_1:
736 2.1 The error message "Warning: Cannot add header information - headers already sent by ..." is displayed, what's the problem?
737 ------------------------------------------------------------------------------------------------------------------------------
739 Edit your :file:`config.inc.php` file and ensure there is nothing (I.E. no
740 blank lines, no spaces, no characters...) neither before the ``<?php`` tag at
741 the beginning, neither after the ``?>`` tag at the end.
743 .. _faq2_2:
745 2.2 phpMyAdmin can't connect to MySQL. What's wrong?
746 ----------------------------------------------------
748 Either there is an error with your PHP setup or your username/password
749 is wrong. Try to make a small script which uses mysql\_connect and see
750 if it works. If it doesn't, it may be you haven't even compiled MySQL
751 support into PHP.
753 .. _faq2_3:
755 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?
756 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
758 The error message can also be: :guilabel:`Error #2002 - The server is not
759 responding (or the local MySQL server's socket is not correctly configured)`.
761 First, you need to determine what socket is being used by MySQL. To do this,
762 connect to your server and go to the MySQL bin directory. In this directory
763 there should be a file named *mysqladmin*. Type ``./mysqladmin variables``, and
764 this should give you a bunch of info about your MySQL server, including the
765 socket (*/tmp/mysql.sock*, for example). You can also ask your ISP for the
766 connection info or, if you're hosting your own, connect from the 'mysql'
767 command-line client and type 'status' to get the connection type and socket or
768 port number.
770 Then, you need to tell PHP to use this socket. You can do this for all PHP in
771 the :file:`php.ini` or for phpMyAdmin only in the :file:`config.inc.php`. For
772 example: :config:option:`$cfg['Servers'][$i]['socket']`  Please also make sure
773 that the permissions of this file allow to be readable by your webserver.
775 On my RedHat-Box the socket of MySQL is */var/lib/mysql/mysql.sock*.
776 In your :file:`php.ini` you will find a line
778 .. code-block:: ini
780     mysql.default_socket = /tmp/mysql.sock
782 change it to
784 .. code-block:: ini
786     mysql.default_socket = /var/lib/mysql/mysql.sock
788 Then restart apache and it will work.
790 Have also a look at the `corresponding section of the MySQL
791 documentation <https://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html>`_.
793 .. _faq2_4:
795 2.4 Nothing is displayed by my browser when I try to run phpMyAdmin, what can I do?
796 -----------------------------------------------------------------------------------
798 Try to set the :config:option:`$cfg['OBGzip']` directive to ``false`` in the phpMyAdmin configuration
799 file. It helps sometime. Also have a look at your PHP version number:
800 if it contains "b" or "alpha" it means you're running a testing
801 version of PHP. That's not a so good idea, please upgrade to a plain
802 revision.
804 .. _faq2_5:
806 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?
807 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
809 Check your webserver setup if it correctly fills in either PHP_SELF or REQUEST_URI variables.
811 If you are running phpMyAdmin behind reverse proxy, please set the
812 :config:option:`$cfg['PmaAbsoluteUri']` directive in the phpMyAdmin
813 configuration file to match your setup.
815 .. _faq2_6:
817 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.
818 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
820 When you are using a port on your localhost, which you redirect via
821 port-forwarding to another host, MySQL is not resolving the localhost
822 as expected. Erik Wasser explains: The solution is: if your host is
823 "localhost" MySQL (the command line tool :command:`mysql` as well) always
824 tries to use the socket connection for speeding up things. And that
825 doesn't work in this configuration with port forwarding. If you enter
826 "127.0.0.1" as hostname, everything is right and MySQL uses the
827 :term:`TCP` connection.
829 .. _faqthemes:
831 2.7 Using and creating themes
832 -----------------------------
834 See :ref:`themes`.
836 .. _faqmissingparameters:
838 2.8 I get "Missing parameters" errors, what can I do?
839 -----------------------------------------------------
841 Here are a few points to check:
843 * In :file:`config.inc.php`, try to leave the :config:option:`$cfg['PmaAbsoluteUri']` directive empty. See also
844   :ref:`faq4_7`.
845 * Maybe you have a broken PHP installation or you need to upgrade your
846   Zend Optimizer. See <https://bugs.php.net/bug.php?id=31134>.
847 * If you are using Hardened PHP with the ini directive
848   ``varfilter.max_request_variables`` set to the default (200) or
849   another low value, you could get this error if your table has a high
850   number of columns. Adjust this setting accordingly. (Thanks to Klaus
851   Dorninger for the hint).
852 * In the :file:`php.ini` directive ``arg_separator.input``, a value of ";"
853   will cause this error. Replace it with "&;".
854 * If you are using `Suhosin <https://suhosin5.suhosin.org/stories/index.html>`_, you
855   might want to increase `request limits <https://suhosin5.suhosin.org/stories/faq.html>`_.
856 * The directory specified in the :file:`php.ini` directive
857   ``session.save_path`` does not exist or is read-only (this can be caused
858   by `bug in the PHP installer <https://bugs.php.net/bug.php?id=39842>`_).
860 .. _faq2_9:
862 2.9 Seeing an upload progress bar
863 ---------------------------------
865 To be able to see a progress bar during your uploads, your server must
866 have the `uploadprogress <https://pecl.php.net/package/uploadprogress>`_ extension, and
867 you must be running PHP 5.4.0 or higher. Moreover, the JSON extension
868 has to be enabled in your PHP.
870 If using PHP 5.4.0 or higher, you must set
871 ``session.upload_progress.enabled`` to ``1`` in your :file:`php.ini`. However,
872 starting from phpMyAdmin version 4.0.4, session-based upload progress has
873 been temporarily deactivated due to its problematic behavior.
875 .. _faq2_10:
877 2.10 How to generate a string of random bytes
878 ---------------------------------------------
880 One way to generate a string of random bytes suitable for cryptographic use is using the
881 `random_bytes <https://www.php.net/random_bytes>`_ :term:`PHP` function. Since this function returns a binary string,
882 the returned value should be converted to printable format before being able to copy it.
884 For example, the :config:option:`$cfg['blowfish_secret']` configuration directive requires a 32-bytes long string. The
885 following command can be used to generate a hexadecimal representation of this string.
887 .. code-block:: sh
889     php -r 'echo bin2hex(random_bytes(32)) . PHP_EOL;'
891 The above example will output something similar to:
893 .. code-block:: sh
895     f16ce59f45714194371b48fe362072dc3b019da7861558cd4ad29e4d6fb13851
897 And then this hexadecimal value can be used in the configuration file.
899 .. code-block:: php
901     $cfg['blowfish_secret'] = sodium_hex2bin('f16ce59f45714194371b48fe362072dc3b019da7861558cd4ad29e4d6fb13851');
903 The `sodium_hex2bin <https://www.php.net/sodium_hex2bin>`_ function is used here to convert the hexadecimal value back to the
904 binary format.
906 .. _faqlimitations:
908 Known limitations
909 +++++++++++++++++
911 .. _login_bug:
913 3.1 When using HTTP authentication, a user who logged out can not log in again in with the same nick.
914 -----------------------------------------------------------------------------------------------------
916 This is related to the authentication mechanism (protocol) used by
917 phpMyAdmin. To bypass this problem: just close all the opened browser
918 windows and then go back to phpMyAdmin. You should be able to log in
919 again.
921 .. _faq3_2:
923 3.2 When dumping a large table in compressed mode, I get a memory limit error or a time limit error.
924 ----------------------------------------------------------------------------------------------------
926 Compressed dumps are built in memory and because of this are limited
927 to php's memory limit. For gzip/bzip2 exports this can be overcome
928 since 2.5.4 using :config:option:`$cfg['CompressOnFly']` (enabled by default).
929 zip exports can not be handled this way, so if you need zip files for larger
930 dump, you have to use another way.
932 .. _faq3_3:
934 3.3 With InnoDB tables, I lose foreign key relationships when I rename a table or a column.
935 -------------------------------------------------------------------------------------------
937 This is an InnoDB bug, see <https://bugs.mysql.com/bug.php?id=21704>.
939 .. _faq3_4:
941 3.4 I am unable to import dumps I created with the mysqldump tool bundled with the MySQL server distribution.
942 -------------------------------------------------------------------------------------------------------------
944 The problem is that older versions of ``mysqldump`` created invalid
945 comments like this:
947 .. code-block:: mysql
949     -- MySQL dump 8.22
950     --
951     -- Host: localhost Database: database
952     ---------------------------------------------------------
953     -- Server version 3.23.54
955 The invalid part of the code is the horizontal line made of dashes
956 that appears once in every dump created with mysqldump. If you want to
957 run your dump you have to turn it into valid MySQL. This means, you
958 have to add a whitespace after the first two dashes of the line or add
959 a # before it:  ``-- -------------------------------------------------------`` or
960 ``#---------------------------------------------------------``
962 .. _faq3_5:
964 3.5 When using nested folders, multiple hierarchies are displayed in a wrong manner.
965 ------------------------------------------------------------------------------------
967 Please note that you should not use the separating string multiple
968 times without any characters between them, or at the beginning/end of
969 your table name. If you have to, think about using another
970 TableSeparator or disabling that feature.
972 .. seealso:: :config:option:`$cfg['NavigationTreeTableSeparator']`
974 .. _faq3_6:
976 3.6 (withdrawn).
977 -----------------
979 .. _faq3_7:
981 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?
982 -----------------------------------------------------------------------------------------------------------------------------------------------------------
984 Your table neither have a :term:`primary key` nor an :term:`unique key`, so we must
985 use a long expression to identify this row. This causes problems to
986 parse\_url function. The workaround is to create a :term:`primary key`
987 or :term:`unique key`.
989 .. _faq3_8:
991 3.8 I cannot use (clickable) HTML-forms in columns where I put a MIME-Transformation onto!
992 ------------------------------------------------------------------------------------------
994 Due to a surrounding form-container (for multi-row delete checkboxes),
995 no nested forms can be put inside the table where phpMyAdmin displays
996 the results. You can, however, use any form inside of a table if keep
997 the parent form-container with the target to tbl\_row\_delete.php and
998 just put your own input-elements inside. If you use a custom submit
999 input field, the form will submit itself to the displaying page again,
1000 where you can validate the $HTTP\_POST\_VARS in a transformation. For
1001 a tutorial on how to effectively use transformations, see our `Link
1002 section <https://www.phpmyadmin.net/docs/>`_ on the
1003 official phpMyAdmin-homepage.
1005 .. _faq3_9:
1007 3.9 I get error messages when using "--sql\_mode=ANSI" for the MySQL server.
1008 ----------------------------------------------------------------------------
1010 When MySQL is running in ANSI-compatibility mode, there are some major
1011 differences in how :term:`SQL` is structured (see
1012 <https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html>). Most important of all, the
1013 quote-character (") is interpreted as an identifier quote character and not as
1014 a string quote character, which makes many internal phpMyAdmin operations into
1015 invalid :term:`SQL` statements. There is no
1016 workaround to this behaviour.  News to this item will be posted in `issue
1017 #7383 <https://github.com/phpmyadmin/phpmyadmin/issues/7383>`_.
1019 .. _faq3_10:
1021 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.
1022 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1024 Please make sure that your table has a :term:`primary key`, so that phpMyAdmin
1025 can use it for the Edit and Delete links.
1027 .. _faq3_11:
1029 3.11 The number of rows for InnoDB tables is not correct.
1030 ---------------------------------------------------------
1032 phpMyAdmin uses a quick method to get the row count, and this method only
1033 returns an approximate count in the case of InnoDB tables. See
1034 :config:option:`$cfg['MaxExactCount']` for a way to modify those results, but
1035 this could have a serious impact on performance.
1036 However, one can easily replace the approximate row count with exact count by
1037 simply clicking on the approximate count. This can also be done for all tables
1038 at once by clicking on the rows sum displayed at the bottom.
1040 .. seealso:: :config:option:`$cfg['MaxExactCount']`
1042 .. _faq3_12:
1044 3.12 (withdrawn).
1045 -----------------
1047 .. _faq3_13:
1049 3.13 I get an error when entering ``USE`` followed by a db name containing an hyphen.
1050 -------------------------------------------------------------------------------------
1052 The tests I have made with MySQL 5.1.49 shows that the API does not
1053 accept this syntax for the USE command.
1055 .. _faq3_14:
1057 3.14 I am not able to browse a table when I don't have the right to SELECT one of the columns.
1058 ----------------------------------------------------------------------------------------------
1060 This has been a known limitation of phpMyAdmin since the beginning and
1061 it's not likely to be solved in the future.
1063 .. _faq3_15:
1065 3.15 (withdrawn).
1066 -----------------
1068 .. _faq3_16:
1070 3.16 (withdrawn).
1071 -----------------
1073 .. _faq3_17:
1075 3.17 (withdrawn).
1076 -----------------
1078 .. _faq3_18:
1080 3.18 When I import a CSV file that contains multiple tables, they are lumped together into a single table.
1081 ----------------------------------------------------------------------------------------------------------
1083 There is no reliable way to differentiate tables in :term:`CSV` format. For the
1084 time being, you will have to break apart :term:`CSV` files containing multiple
1085 tables.
1087 .. _faq3_19:
1089 3.19 When I import a file and have phpMyAdmin determine the appropriate data structure it only uses int, decimal, and varchar types.
1090 ------------------------------------------------------------------------------------------------------------------------------------
1092 Currently, the import type-detection system can only assign these
1093 MySQL types to columns. In future, more will likely be added but for
1094 the time being you will have to edit the structure to your liking
1095 post-import.  Also, you should note the fact that phpMyAdmin will use
1096 the size of the largest item in any given column as the column size
1097 for the appropriate type. If you know you will be adding larger items
1098 to that column then you should manually adjust the column sizes
1099 accordingly. This is done for the sake of efficiency.
1101 .. _faq3_20:
1103 3.20 After upgrading, some bookmarks are gone or their content cannot be shown.
1104 -------------------------------------------------------------------------------
1106 At some point, the character set used to store bookmark content has changed.
1107 It's better to recreate your bookmark from the newer phpMyAdmin version.
1109 .. _faq3_21:
1111 3.21 I am unable to log in with a username containing unicode characters such as Ăˇ.
1112 -----------------------------------------------------------------------------------
1114 This can happen if MySQL server is not configured to use utf-8 as default
1115 charset. This is a limitation of how PHP and the MySQL server interact; there
1116 is no way for PHP to set the charset before authenticating.
1118 .. seealso::
1120     `phpMyAdmin issue 12232 <https://github.com/phpmyadmin/phpmyadmin/issues/12232>`_,
1121     `MySQL documentation note <https://www.php.net/manual/en/mysqli.real-connect.php#refsect1-mysqli.real-connect-notes>`_
1123 .. _faqmultiuser:
1125 ISPs, multi-user installations
1126 ++++++++++++++++++++++++++++++
1128 .. _faq4_1:
1130 4.1 I'm an ISP. Can I setup one central copy of phpMyAdmin or do I need to install it for each customer?
1131 --------------------------------------------------------------------------------------------------------
1133 Since version 2.0.3, you can setup a central copy of phpMyAdmin for all your
1134 users. The development of this feature was kindly sponsored by NetCologne GmbH.
1135 This requires a properly setup MySQL user management and phpMyAdmin
1136 :term:`HTTP` or cookie authentication.
1138 .. seealso:: :ref:`authentication_modes`
1140 .. _faq4_2:
1142 4.2 What's the preferred way of making phpMyAdmin secure against evil access?
1143 -----------------------------------------------------------------------------
1145 This depends on your system. If you're running a server which cannot be
1146 accessed by other people, it's sufficient to use the directory protection
1147 bundled with your webserver (with Apache you can use :term:`.htaccess` files,
1148 for example). If other people have telnet access to your server, you should use
1149 phpMyAdmin's :term:`HTTP` or cookie authentication features.
1151 Suggestions:
1153 * Your :file:`config.inc.php` file should be ``chmod 660``.
1154 * All your phpMyAdmin files should be chown -R phpmy.apache, where phpmy
1155   is a user whose password is only known to you, and apache is the group
1156   under which Apache runs.
1157 * Follow security recommendations for PHP and your webserver.
1159 .. _faq4_3:
1161 4.3 I get errors about not being able to include a file in */lang* or in */libraries*.
1162 --------------------------------------------------------------------------------------
1164 Check :file:`php.ini`, or ask your sysadmin to check it. The
1165 ``include_path`` must contain "." somewhere in it, and
1166 ``open_basedir``, if used, must contain "." and "./lang" to allow
1167 normal operation of phpMyAdmin.
1169 .. _faq4_4:
1171 4.4 phpMyAdmin always gives "Access denied" when using HTTP authentication.
1172 ---------------------------------------------------------------------------
1174 This could happen for several reasons:
1176 * :config:option:`$cfg['Servers'][$i]['controluser']` and/or :config:option:`$cfg['Servers'][$i]['controlpass']`  are wrong.
1177 * The username/password you specify in the login dialog are invalid.
1178 * You have already setup a security mechanism for the phpMyAdmin-
1179   directory, eg. a :term:`.htaccess` file. This would interfere with phpMyAdmin's
1180   authentication, so remove it.
1182 .. _faq4_5:
1184 4.5 Is it possible to let users create their own databases?
1185 -----------------------------------------------------------
1187 Starting with 2.2.5, in the user management page, you can enter a
1188 wildcard database name for a user (for example "joe%"), and put the
1189 privileges you want. For example, adding ``SELECT, INSERT, UPDATE,
1190 DELETE, CREATE, DROP, INDEX, ALTER`` would let a user create/manage
1191 their database(s).
1193 .. _faq4_6:
1195 4.6 How can I use the Host-based authentication additions?
1196 ----------------------------------------------------------
1198 If you have existing rules from an old :term:`.htaccess` file, you can take them and
1199 add a username between the ``'deny'``/``'allow'`` and ``'from'``
1200 strings. Using the username wildcard of ``'%'`` would be a major
1201 benefit here if your installation is suited to using it. Then you can
1202 just add those updated lines into the
1203 :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` array.
1205 If you want a pre-made sample, you can try this fragment. It stops the
1206 'root' user from logging in from any networks other than the private
1207 network :term:`IP` blocks.
1209 .. code-block:: php
1211     //block root from logging in except from the private networks
1212     $cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
1213     $cfg['Servers'][$i]['AllowDeny']['rules'] = [
1214         'deny root from all',
1215         'allow root from localhost',
1216         'allow root from 10.0.0.0/8',
1217         'allow root from 192.168.0.0/16',
1218         'allow root from 172.16.0.0/12',
1219     ];
1221 .. _faq4_7:
1223 4.7 Authentication window is displayed more than once, why?
1224 -----------------------------------------------------------
1226 This happens if you are using a :term:`URL` to start phpMyAdmin which is
1227 different than the one set in your :config:option:`$cfg['PmaAbsoluteUri']`. For
1228 example, a missing "www", or entering with an :term:`IP` address while a domain
1229 name is defined in the config file.
1231 .. _faq4_8:
1233 4.8 Which parameters can I use in the URL that starts phpMyAdmin?
1234 -----------------------------------------------------------------
1236 When starting phpMyAdmin, you can use the ``db``
1237 and ``server`` parameters. This last one can contain
1238 either the numeric host index (from ``$i`` of the configuration file)
1239 or one of the host names present in the configuration file.
1241 For example, to jump directly to a particular database, a URL can be constructed as
1242 ``https://example.com/phpmyadmin/?db=sakila``.
1244 .. seealso:: :ref:`faq1_34`
1246 .. versionchanged:: 4.9.0
1248     Support for using the ``pma_username`` and ``pma_password`` parameters was removed
1249     in phpMyAdmin 4.9.0 (see `PMASA-2019-4 <https://www.phpmyadmin.net/security/PMASA-2019-4/>`_).
1251 .. _faqbrowsers:
1253 Browsers or client OS
1254 +++++++++++++++++++++
1256 .. _faq5_1:
1258 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.
1259 ------------------------------------------------------------------------------------------------------------------------------
1261 We could reproduce this problem only under Win98/98SE. Testing under
1262 WinNT4 or Win2K, we could easily create more than 60 columns.  A
1263 workaround is to create a smaller number of columns, then come back to
1264 your table properties and add the other columns.
1266 .. _faq5_2:
1268 5.2 With Xitami 2.5b4, phpMyAdmin won't process form fields.
1269 ------------------------------------------------------------
1271 This is not a phpMyAdmin problem but a Xitami known bug: you'll face
1272 it with each script/website that use forms. Upgrade or downgrade your
1273 Xitami server.
1275 .. _faq5_3:
1277 5.3 I have problems dumping tables with Konqueror (phpMyAdmin 2.2.2).
1278 ---------------------------------------------------------------------
1280 With Konqueror 2.1.1: plain dumps, zip and gzip dumps work ok, except
1281 that the proposed file name for the dump is always 'tbl\_dump.php'.
1282 The bzip2 dumps don't seem to work. With Konqueror 2.2.1: plain dumps
1283 work; zip dumps are placed into the user's temporary directory, so
1284 they must be moved before closing Konqueror, or else they disappear.
1285 gzip dumps give an error message. Testing needs to be done for
1286 Konqueror 2.2.2.
1288 .. _faq5_4:
1290 5.4 I can't use the cookie authentication mode because Internet Explorer never stores the cookies.
1291 --------------------------------------------------------------------------------------------------
1293 MS Internet Explorer seems to be really buggy about cookies, at least
1294 till version 6.
1296 .. _faq5_5:
1298 5.5 (withdrawn).
1299 ----------------------------------------------------------------------------
1301 .. _faq5_6:
1303 5.6 (withdrawn).
1304 -----------------------------------------------------------------------------------------------------------------------------------------------------------------
1306 .. _faq5_7:
1308 5.7 I refresh (reload) my browser, and come back to the welcome page.
1309 ---------------------------------------------------------------------
1311 Some browsers support right-clicking into the frame you want to
1312 refresh, just do this in the right frame.
1314 .. _faq5_8:
1316 5.8 With Mozilla 0.9.7 I have problems sending a query modified in the query box.
1317 ---------------------------------------------------------------------------------
1319 Looks like a Mozilla bug: 0.9.6 was OK. We will keep an eye on future
1320 Mozilla versions.
1322 .. _faq5_9:
1324 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.
1325 -------------------------------------------------------------------------------------------------------------------------------
1327 This is a Mozilla bug (see bug #26882 at `BugZilla
1328 <https://bugzilla.mozilla.org/>`_).
1330 .. _faq5_10:
1332 5.10 (withdrawn).
1333 -----------------------------------------------------------------------------------------
1335 .. _faq5_11:
1337 5.11 Extended-ASCII characters like German umlauts are displayed wrong.
1338 -----------------------------------------------------------------------
1340 Please ensure that you have set your browser's character set to the
1341 one of the language file you have selected on phpMyAdmin's start page.
1342 Alternatively, you can try the auto detection mode that is supported
1343 by the recent versions of the most browsers.
1345 .. _faq5_12:
1347 5.12 Mac OS X Safari browser changes special characters to "?".
1348 ---------------------------------------------------------------
1350 This issue has been reported by a :term:`macOS` user, who adds that Chimera,
1351 Netscape and Mozilla do not have this problem.
1353 .. _faq5_13:
1355 5.13 (withdrawn)
1356 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1358 .. _faq5_14:
1360 5.14 (withdrawn)
1361 ------------------------------------------------------------------------------------------------------------------
1363 .. _faq5_15:
1365 5.15 (withdrawn)
1366 -----------------------------------------
1368 .. _faq5_16:
1370 5.16 With Internet Explorer, I get "Access is denied" Javascript errors. Or I cannot make phpMyAdmin work under Windows.
1371 ------------------------------------------------------------------------------------------------------------------------
1373 Please check the following points:
1375 * Maybe you have defined your :config:option:`$cfg['PmaAbsoluteUri']` setting in
1376   :file:`config.inc.php` to an :term:`IP` address and you are starting phpMyAdmin
1377   with a :term:`URL` containing a domain name, or the reverse situation.
1378 * Security settings in IE and/or Microsoft Security Center are too high,
1379   thus blocking scripts execution.
1380 * The Windows Firewall is blocking Apache and MySQL. You must allow
1381   :term:`HTTP` ports (80 or 443) and MySQL
1382   port (usually 3306) in the "in" and "out" directions.
1384 .. _faq5_17:
1386 5.17 With Firefox, I cannot delete rows of data or drop a database.
1387 -------------------------------------------------------------------
1389 Many users have confirmed that the Tabbrowser Extensions plugin they
1390 installed in their Firefox is causing the problem.
1392 .. _faq5_18:
1394 5.18 (withdrawn)
1395 -----------------------------------------------------------------------------------------
1397 .. _faq5_19:
1399 5.19 I get JavaScript errors in my browser.
1400 -------------------------------------------
1402 Issues have been reported with some combinations of browser
1403 extensions. To troubleshoot, disable all extensions then clear your
1404 browser cache to see if the problem goes away.
1406 .. _faq5_20:
1408 5.20 I get errors about violating Content Security Policy.
1409 ----------------------------------------------------------
1411 If you see errors like:
1413 .. code-block:: text
1415     Refused to apply inline style because it violates the following Content Security Policy directive
1417 This is usually caused by some software, which wrongly rewrites
1418 :mailheader:`Content Security Policy` headers. Usually this is caused by
1419 antivirus proxy or browser addons which are causing such errors.
1421 If you see these errors, try disabling the HTTP proxy in antivirus or disable
1422 the :mailheader:`Content Security Policy` rewriting in it. If that doesn't
1423 help, try disabling browser extensions.
1425 Alternatively it can be also server configuration issue (if the webserver is
1426 configured to emit :mailheader:`Content Security Policy` headers, they can
1427 override the ones from phpMyAdmin).
1429 Programs known to cause these kind of errors:
1431 * Kaspersky Internet Security
1433 .. _faq5_21:
1435 5.21 I get errors about potentially unsafe operation when browsing table or executing SQL query.
1436 ------------------------------------------------------------------------------------------------
1438 If you see errors like:
1440 .. code-block:: text
1442     A potentially unsafe operation has been detected in your request to this site.
1444 This is usually caused by web application firewall doing requests filtering. It
1445 tries to prevent SQL injection, however phpMyAdmin is tool designed to execute
1446 SQL queries, thus it makes it unusable.
1448 Please allow phpMyAdmin scripts from the web application firewall settings
1449 or disable it completely for phpMyAdmin path.
1451 Programs known to cause these kind of errors:
1453 * Wordfence Web Application Firewall
1455 .. _faqusing:
1457 Using phpMyAdmin
1458 ++++++++++++++++
1460 .. _faq6_1:
1462 6.1 I can't insert new rows into a table / I can't create a table - MySQL brings up a SQL error.
1463 ------------------------------------------------------------------------------------------------
1465 Examine the :term:`SQL` error with care.
1466 Often the problem is caused by specifying a wrong column-type. Common
1467 errors include:
1469 * Using ``VARCHAR`` without a size argument
1470 * Using ``TEXT`` or ``BLOB`` with a size argument
1472 Also, look at the syntax chapter in the MySQL manual to confirm that
1473 your syntax is correct.
1475 .. _faq6_2:
1477 6.2 When I create a table, I set an index for two columns and phpMyAdmin generates only one index with those two columns.
1478 -------------------------------------------------------------------------------------------------------------------------
1480 This is the way to create a multi-columns index. If you want two
1481 indexes, create the first one when creating the table, save, then
1482 display the table properties and click the Index link to create the
1483 other index.
1485 .. _faq6_3:
1487 6.3 How can I insert a null value into my table?
1488 ------------------------------------------------
1490 Since version 2.2.3, you have a checkbox for each column that can be
1491 null. Before 2.2.3, you had to enter "null", without the quotes, as
1492 the column's value. Since version 2.5.5, you have to use the checkbox
1493 to get a real NULL value, so if you enter "NULL" this means you want a
1494 literal NULL in the column, and not a NULL value (this works in PHP4).
1496 .. _faq6_4:
1498 6.4 How can I backup my database or table?
1499 ------------------------------------------
1501 Click on a database or table name in the navigation panel, the properties will
1502 be displayed. Then on the menu, click "Export", you can dump the structure, the
1503 data, or both. This will generate standard :term:`SQL` statements that can be
1504 used to recreate your database/table.  You will need to choose "Save as file",
1505 so that phpMyAdmin can transmit the resulting dump to your station.  Depending
1506 on your PHP configuration, you will see options to compress the dump. See also
1507 the :config:option:`$cfg['ExecTimeLimit']` configuration variable. For
1508 additional help on this subject, look for the word "dump" in this document.
1510 .. _faq6_5:
1512 6.5 How can I restore (upload) my database or table using a dump? How can I run a ".sql" file?
1513 ----------------------------------------------------------------------------------------------
1515 Click on a database name in the navigation panel, the properties will
1516 be displayed. Select "Import" from the list of tabs in the right–hand
1517 frame (or ":term:`SQL`" if your phpMyAdmin
1518 version is previous to 2.7.0). In the "Location of the text file"
1519 section, type in the path to your dump filename, or use the Browse
1520 button. Then click Go.  With version 2.7.0, the import engine has been
1521 re–written, if possible it is suggested that you upgrade to take
1522 advantage of the new features.  For additional help on this subject,
1523 look for the word "upload" in this document.
1525 Note: For errors while importing of dumps exported from older MySQL versions to newer MySQL versions,
1526 please check :ref:`faq6_41`.
1528 .. _faq6_6:
1530 6.6 How can I use the relation table in Query-by-example?
1531 ---------------------------------------------------------
1533 Here is an example with the tables persons, towns and countries, all
1534 located in the database "mydb". If you don't have a ``pma__relation``
1535 table, create it as explained in the configuration section. Then
1536 create the example tables:
1538 .. code-block:: mysql
1540     CREATE TABLE REL_countries (
1541     country_code char(1) NOT NULL default '',
1542     description varchar(10) NOT NULL default '',
1543     PRIMARY KEY (country_code)
1544     ) ENGINE=MyISAM;
1546     INSERT INTO REL_countries VALUES ('C', 'Canada');
1548     CREATE TABLE REL_persons (
1549     id tinyint(4) NOT NULL auto_increment,
1550     person_name varchar(32) NOT NULL default '',
1551     town_code varchar(5) default '0',
1552     country_code char(1) NOT NULL default '',
1553     PRIMARY KEY (id)
1554     ) ENGINE=MyISAM;
1556     INSERT INTO REL_persons VALUES (11, 'Marc', 'S', 'C');
1557     INSERT INTO REL_persons VALUES (15, 'Paul', 'S', 'C');
1559     CREATE TABLE REL_towns (
1560     town_code varchar(5) NOT NULL default '0',
1561     description varchar(30) NOT NULL default '',
1562     PRIMARY KEY (town_code)
1563     ) ENGINE=MyISAM;
1565     INSERT INTO REL_towns VALUES ('S', 'Sherbrooke');
1566     INSERT INTO REL_towns VALUES ('M', 'MontrĂ©al');
1568 To setup appropriate links and display information:
1570 * on table "REL\_persons" click Structure, then Relation view
1571 * for "town\_code", choose from dropdowns, "mydb", "REL\_towns", "town\_code"
1572   for foreign database, table and column respectively
1573 * for "country\_code", choose  from dropdowns, "mydb", "REL\_countries",
1574   "country\_code" for foreign database, table and column respectively
1575 * on table "REL\_towns" click Structure, then Relation view
1576 * in "Choose column to display", choose "description"
1577 * repeat the two previous steps for table "REL\_countries"
1579 Then test like this:
1581 * Click on your db name in the navigation panel
1582 * Choose "Query"
1583 * Use tables: persons, towns, countries
1584 * Click "Update query"
1585 * In the columns row, choose persons.person\_name and click the "Show"
1586   tickbox
1587 * Do the same for towns.description and countries.descriptions in the
1588   other 2 columns
1589 * Click "Update query" and you will see in the query box that the
1590   correct joins have been generated
1591 * Click "Submit query"
1593 .. _faqdisplay:
1595 6.7 How can I use the "display column" feature?
1596 -----------------------------------------------
1598 Starting from the previous example, create the ``pma__table_info`` as
1599 explained in the configuration section, then browse your persons
1600 table, and move the mouse over a town code or country code.  See also
1601 :ref:`faq6_21` for an additional feature that "display column"
1602 enables: drop-down list of possible values.
1604 .. _faqpdf:
1606 6.8 How can I produce a PDF schema of my database?
1607 --------------------------------------------------
1609 First the configuration variables "relation", "table\_coords" and
1610 "pdf\_pages" have to be filled in.
1612 * Select your database in the navigation panel.
1613 * Choose ":guilabel:`Designer`" in the navigation bar at the top.
1614 * Move the tables the way you want them.
1615 * Choose ":guilabel:`Export schema`" in the left menu.
1616 * The export modal will open.
1617 * Select the type of export to :term:`PDF`, you may adjust the other settings.
1618 * Submit the form and the file will start downloading.
1620 .. seealso::
1622     :ref:`relations`
1624 .. _faq6_9:
1626 6.9 phpMyAdmin is changing the type of one of my columns!
1627 ---------------------------------------------------------
1629 No, it's MySQL that is doing `silent column type changing
1630 <https://dev.mysql.com/doc/refman/5.7/en/silent-column-changes.html>`_.
1632 .. _underscore:
1634 6.10 When creating a privilege, what happens with underscores in the database name?
1635 -----------------------------------------------------------------------------------
1637 If you do not put a backslash before the underscore, this is a
1638 wildcard grant, and the underscore means "any character". So, if the
1639 database name is "john\_db", the user would get rights to john1db,
1640 john2db ... If you put a backslash before the underscore, it means
1641 that the database name will have a real underscore.
1643 .. _faq6_11:
1645 6.11 What is the curious symbol Ă¸ in the statistics pages?
1646 ----------------------------------------------------------
1648 It means "average".
1650 .. _faqexport:
1652 6.12 I want to understand some Export options.
1653 ----------------------------------------------
1655 **Structure:**
1657 * "Add DROP TABLE" will add a line telling MySQL to `drop the table
1658   <https://dev.mysql.com/doc/refman/5.7/en/drop-table.html>`_, if it already
1659   exists during the import. It does NOT drop the table after your
1660   export, it only affects the import file.
1661 * "If Not Exists" will only create the table if it doesn't exist.
1662   Otherwise, you may get an error if the table name exists but has a
1663   different structure.
1664 * "Add AUTO\_INCREMENT value" ensures that AUTO\_INCREMENT value (if
1665   any) will be included in backup.
1666 * "Enclose table and column names with backquotes" ensures that column
1667   and table names formed with special characters are protected.
1668 * "Add into comments" includes column comments, relations, and media
1669   types set in the pmadb in the dump as :term:`SQL` comments
1670   (*/\* xxx \*/*).
1672 **Data:**
1674 * "Complete inserts" adds the column names on every INSERT command, for
1675   better documentation (but resulting file is bigger).
1676 * "Extended inserts" provides a shorter dump file by using only once the
1677   INSERT verb and the table name.
1678 * "Delayed inserts" are best explained in the `MySQL manual - INSERT DELAYED Syntax
1679   <https://dev.mysql.com/doc/refman/5.7/en/insert-delayed.html>`_.
1680 * "Ignore inserts" treats errors as a warning instead. Again, more info
1681   is provided in the `MySQL manual - INSERT Syntax
1682   <https://dev.mysql.com/doc/refman/5.7/en/insert.html>`_, but basically with
1683   this selected, invalid values are adjusted and inserted rather than
1684   causing the entire statement to fail.
1686 .. _faq6_13:
1688 6.13 I would like to create a database with a dot in its name.
1689 --------------------------------------------------------------
1691 This is a bad idea, because in MySQL the syntax "database.table" is
1692 the normal way to reference a database and table name. Worse, MySQL
1693 will usually let you create a database with a dot, but then you cannot
1694 work with it, nor delete it.
1696 .. _faqsqlvalidator:
1698 6.14 (withdrawn).
1699 -----------------
1701 .. _faq6_15:
1703 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".
1704 -------------------------------------------------------------------------------------------------------------------------------------------
1706 The right way to do this, is to create the column without any indexes,
1707 then display the table structure and use the "Create an index" dialog.
1708 On this page, you will be able to choose your BLOB column, and set a
1709 size to the index, which is the condition to create an index on a BLOB
1710 column.
1712 .. _faq6_16:
1714 6.16 How can I simply move in page with plenty editing fields?
1715 --------------------------------------------------------------
1717 You can use :kbd:`Ctrl+arrows` (:kbd:`Option+Arrows` in Safari) for moving on
1718 most pages with many editing fields (table structure changes, row editing,
1719 etc.).
1721 .. _faq6_17:
1723 6.17 Transformations: I can't enter my own mimetype! What is this feature then useful for?
1724 ------------------------------------------------------------------------------------------
1726 Defining mimetypes is of no use if you can't put
1727 transformations on them. Otherwise you could just put a comment on the
1728 column. Because entering your own mimetype will cause serious syntax
1729 checking issues and validation, this introduces a high-risk false-
1730 user-input situation. Instead you have to initialize mimetypes using
1731 functions or empty mimetype definitions.
1733 Plus, you have a whole overview of available mimetypes. Who knows all those
1734 mimetypes by heart so they can enter it at will?
1736 .. _faqbookmark:
1738 6.18 Bookmarks: Where can I store bookmarks? Why can't I see any bookmarks below the query box? What are these variables for?
1739 -----------------------------------------------------------------------------------------------------------------------------
1741 You need to have configured the :ref:`linked-tables` for using bookmarks
1742 feature. Once you have done that, you can use bookmarks in the :guilabel:`SQL` tab.
1744 .. seealso:: :ref:`bookmarks`
1746 .. _faq6_19:
1748 6.19 How can I create simple LATEX document to include exported table?
1749 ----------------------------------------------------------------------
1751 You can simply include table in your LATEX documents,
1752 minimal sample document should look like following one (assuming you
1753 have table exported in file :file:`table.tex`):
1755 .. code-block:: latex
1757     \documentclass{article} % or any class you want
1758     \usepackage{longtable}  % for displaying table
1759     \begin{document}        % start of document
1760     \include{table}         % including exported table
1761     \end{document}          % end of document
1763 .. _faq6_20:
1765 6.20 I see a lot of databases which are not mine, and cannot access them.
1766 -------------------------------------------------------------------------
1768 You have one of these global privileges: CREATE TEMPORARY TABLES, SHOW
1769 DATABASES, LOCK TABLES. Those privileges also enable users to see all the
1770 database names. So if your users do not need those privileges, you can remove
1771 them and their databases list will shorten.
1773 .. seealso:: <https://bugs.mysql.com/bug.php?id=179>
1775 .. _faq6_21:
1777 6.21 In edit/insert mode, how can I see a list of possible values for a column, based on some foreign table?
1778 ------------------------------------------------------------------------------------------------------------
1780 You have to setup appropriate links between the tables, and also setup
1781 the "display column" in the foreign table. See :ref:`faq6_6` for an
1782 example. Then, if there are 100 values or less in the foreign table, a
1783 drop-down list of values will be available. You will see two lists of
1784 values, the first list containing the key and the display column, the
1785 second list containing the display column and the key. The reason for
1786 this is to be able to type the first letter of either the key or the
1787 display column. For 100 values or more, a distinct window will appear,
1788 to browse foreign key values and choose one. To change the default
1789 limit of 100, see :config:option:`$cfg['ForeignKeyMaxLimit']`.
1791 .. _faq6_22:
1793 6.22 Bookmarks: Can I execute a default bookmark automatically when entering Browse mode for a table?
1794 -----------------------------------------------------------------------------------------------------
1796 Yes. If a bookmark has the same label as a table name and it's not a
1797 public bookmark, it will be executed.
1799 .. seealso:: :ref:`bookmarks`
1801 .. _faq6_23:
1803 6.23 Export: I heard phpMyAdmin can export Microsoft Excel files?
1804 -----------------------------------------------------------------
1806 You can use :term:`CSV` for Microsoft Excel,
1807 which works out of the box.
1809 .. versionchanged:: 3.4.5
1810     Since phpMyAdmin 3.4.5 support for direct export to Microsoft Excel version
1811     97 and newer was dropped.
1813 .. _faq6_24:
1815 6.24 Now that phpMyAdmin supports native MySQL 4.1.x column comments, what happens to my column comments stored in pmadb?
1816 -------------------------------------------------------------------------------------------------------------------------
1818 Automatic migration of a table's pmadb-style column comments to the
1819 native ones is done whenever you enter Structure page for this table.
1821 .. _faq6_25:
1823 6.25 (withdrawn).
1824 -----------------
1826 .. _faq6_26:
1828 6.26 How can I select a range of rows?
1829 --------------------------------------
1831 Click the first row of the range, hold the shift key and click the
1832 last row of the range. This works everywhere you see rows, for example
1833 in Browse mode or on the Structure page.
1835 .. _faq6_27:
1837 6.27 What format strings can I use?
1838 -----------------------------------
1840 In all places where phpMyAdmin accepts format strings, you can use
1841 ``@VARIABLE@`` expansion and `strftime <https://www.php.net/strftime>`_
1842 format strings. The expanded variables depend on a context (for
1843 example, if you haven't chosen a table, you can not get the table
1844 name), but the following variables can be used:
1846 ``@HTTP_HOST@``
1847     HTTP host that runs phpMyAdmin
1848 ``@SERVER@``
1849     MySQL server name
1850 ``@VERBOSE@``
1851     Verbose MySQL server name as defined in :config:option:`$cfg['Servers'][$i]['verbose']`
1852 ``@VSERVER@``
1853     Verbose MySQL server name if set, otherwise normal
1854 ``@DATABASE@``
1855     Currently opened database
1856 ``@TABLE@``
1857     Currently opened table
1858 ``@COLUMNS@``
1859     Columns of the currently opened table
1860 ``@PHPMYADMIN@``
1861     phpMyAdmin with version
1863 .. _faq6_28:
1865 6.28 (withdrawn).
1866 -----------------
1868 .. _faq6_29:
1870 6.29 Why can't I get a chart from my query result table?
1871 --------------------------------------------------------
1873 Not every table can be put to the chart. Only tables with one, two or
1874 three columns can be visualised as a chart. Moreover the table must be
1875 in a special format for chart script to understand it. Currently
1876 supported formats can be found in :ref:`charts`.
1878 .. _faq6_30:
1880 6.30 Import: How can I import ESRI Shapefiles?
1881 ----------------------------------------------
1883 An ESRI Shapefile is actually a set of several files, where .shp file
1884 contains geometry data and .dbf file contains data related to those
1885 geometry data. To read data from .dbf file you need to have PHP
1886 compiled with the dBase extension (--enable-dbase). Otherwise only
1887 geometry data will be imported.
1889 To upload these set of files you can use either of the following
1890 methods:
1892 Configure upload directory with :config:option:`$cfg['UploadDir']`, upload both .shp and .dbf files with
1893 the same filename and chose the .shp file from the import page.
1895 Create a zip archive with .shp and .dbf files and import it. For this
1896 to work, you need to set :config:option:`$cfg['TempDir']` to a place where the web server user can
1897 write (for example ``'./tmp'``).
1899 To create the temporary directory on a UNIX-based system, you can do:
1901 .. code-block:: sh
1903     cd phpMyAdmin
1904     mkdir tmp
1905     chmod o+rwx tmp
1907 .. _faq6_31:
1909 6.31 How do I create a relation in designer?
1910 --------------------------------------------
1912 To select relation, click:  The display column is shown in pink. To
1913 set/unset a column as the display column, click the "Choose column to
1914 display" icon, then click on the appropriate column name.
1916 .. _faq6_32:
1918 6.32 How can I use the zoom search feature?
1919 -------------------------------------------
1921 The Zoom search feature is an alternative to table search feature. It allows
1922 you to explore a table by representing its data in a scatter plot. You can
1923 locate this feature by selecting a table and clicking the :guilabel:`Search`
1924 tab. One of the sub-tabs in the :guilabel:`Table Search` page is
1925 :guilabel:`Zoom Search`.
1927 Consider the table REL\_persons in :ref:`faq6_6` for
1928 an example. To use zoom search, two columns need to be selected, for
1929 example, id and town\_code. The id values will be represented on one
1930 axis and town\_code values on the other axis. Each row will be
1931 represented as a point in a scatter plot based on its id and
1932 town\_code. You can include two additional search criteria apart from
1933 the two fields to display.
1935 You can choose which field should be
1936 displayed as label for each point. If a display column has been set
1937 for the table (see :ref:`faqdisplay`), it is taken as the label unless
1938 you specify otherwise. You can also select the maximum number of rows
1939 you want to be displayed in the plot by specifing it in the 'Max rows
1940 to plot' field. Once you have decided over your criteria, click 'Go'
1941 to display the plot.
1943 After the plot is generated, you can use the
1944 mouse wheel to zoom in and out of the plot. In addition, panning
1945 feature is enabled to navigate through the plot. You can zoom-in to a
1946 certain level of detail and use panning to locate your area of
1947 interest. Clicking on a point opens a dialogue box, displaying field
1948 values of the data row represented by the point. You can edit the
1949 values if required and click on submit to issue an update query. Basic
1950 instructions on how to use can be viewed by clicking the 'How to use?'
1951 link located just above the plot.
1953 .. _faq6_33:
1955 6.33 When browsing a table, how can I copy a column name?
1956 ---------------------------------------------------------
1958 Selecting the name of the column within the browse table header cell
1959 for copying is difficult, as the columns support reordering by
1960 dragging the header cells as well as sorting by clicking on the linked
1961 column name. To copy a column name, double-click on the empty area
1962 next to the column name, when the tooltip tells you to do so. This
1963 will show you an input box with the column name. You may right-click
1964 the column name within this input box to copy it to your clipboard.
1966 .. _faq6_34:
1968 6.34 How can I use the Favorite Tables feature?
1969 ---------------------------------------------------------
1971 Favorite Tables feature is very much similar to Recent Tables feature.
1972 It allows you to add a shortcut for the frequently used tables of any
1973 database in the navigation panel . You can easily navigate to any table
1974 in the list by simply choosing it from the list. These tables are stored
1975 in your browser's local storage if you have not configured your
1976 `phpMyAdmin Configuration Storage`. Otherwise these entries are stored in
1977 `phpMyAdmin Configuration Storage`.
1979 IMPORTANT: In absence of `phpMyAdmin Configuration Storage`, your Favorite
1980 tables may be different in different browsers based on your different
1981 selections in them.
1983 To add a table to Favorite list simply click on the `Gray` star in front
1984 of a table name in the list of tables of a Database and wait until it
1985 turns to `Yellow`.
1986 To remove a table from list, simply click on the `Yellow` star and
1987 wait until it turns `Gray` again.
1989 Using :config:option:`$cfg['NumFavoriteTables']` in your :file:`config.inc.php`
1990 file, you can define the  maximum number of favorite tables shown in the
1991 navigation panel. Its default value is `10`.
1993 .. _faq6_35:
1995 6.35 How can I use the Range search feature?
1996 ---------------------------------------------------------
1998 With the help of range search feature, one can specify a range of values for
1999 particular column(s) while performing search operation on a table from the `Search`
2000 tab.
2002 To use this feature simply click on the `BETWEEN` or `NOT BETWEEN` operators
2003 from the operator select list in front of the column name. On choosing one of the
2004 above options, a dialog box will show up asking for the `Minimum` and `Maximum`
2005 value for that column. Only the specified range of values will be included
2006 in case of `BETWEEN` and excluded in case of `NOT BETWEEN` from the final results.
2008 Note: The Range search feature will work only `Numeric` and `Date` data type columns.
2010 .. _faq6_36:
2012 6.36 What is Central columns and how can I use this feature?
2013 ------------------------------------------------------------
2015 As the name suggests, the Central columns feature enables to maintain a central list of
2016 columns per database to avoid similar name for the same data element and bring consistency
2017 of data type for the same data element. You can use the central list of columns to
2018 add an element to any table structure in that database which will save from writing
2019 similar column name and column definition.
2021 To add a column to central list, go to table structure page, check the columns you want
2022 to include and then simply click on "Add to central columns". If you want to add all
2023 unique columns from more than one table from a database then go to database structure page,
2024 check the tables you want to include and then select "Add columns to central list".
2026 To remove a column from central list, go to Table structure page, check the columns you want
2027 to remove and then simply click on "Remove from central columns". If you want to remove all
2028 columns from more than one tables from a database then go to database structure page,
2029 check the tables you want to include and then select "Remove columns from central list".
2031 To view and manage the central list, select the database you want to manage central columns
2032 for then from the top menu click on "Central columns". You will be taken to a page where
2033 you will have options to edit, delete or add new columns to central list.
2035 .. _faq6_37:
2037 6.37 How can I use Improve Table structure feature?
2038 ---------------------------------------------------------
2040 Improve table structure feature helps to bring the table structure upto
2041 Third Normal Form. A wizard is presented to user which asks questions about the
2042 elements during the various steps for normalization and a new structure is proposed
2043 accordingly to bring the table into the First/Second/Third Normal form.
2044 On startup of the wizard, user gets to select upto what normal form they want to
2045 normalize the table structure.
2047 Here is an example table which you can use to test all of the three First, Second and
2048 Third Normal Form.
2050 .. code-block:: mysql
2052     CREATE TABLE `VetOffice` (
2053      `petName` varchar(64) NOT NULL,
2054      `petBreed` varchar(64) NOT NULL,
2055      `petType` varchar(64) NOT NULL,
2056      `petDOB` date NOT NULL,
2057      `ownerLastName` varchar(64) NOT NULL,
2058      `ownerFirstName` varchar(64) NOT NULL,
2059      `ownerPhone1` int(12) NOT NULL,
2060      `ownerPhone2` int(12) NOT NULL,
2061      `ownerEmail` varchar(64) NOT NULL,
2062     );
2064 The above table is not in First normal Form as no :term:`primary key` exists. Primary key
2065 is supposed to be (`petName`,`ownerLastName`,`ownerFirstName`) . If the :term:`primary key`
2066 is chosen as suggested the resultant table won't be in Second as well as Third Normal
2067 form as the following dependencies exists.
2069 .. code-block:: mysql
2071     (OwnerLastName, OwnerFirstName) -> OwnerEmail
2072     (OwnerLastName, OwnerFirstName) -> OwnerPhone
2073     PetBreed -> PetType
2075 Which says, OwnerEmail depends on OwnerLastName and OwnerFirstName.
2076 OwnerPhone depends on OwnerLastName and OwnerFirstName.
2077 PetType depends on PetBreed.
2079 .. _faq6_38:
2081 6.38 How can I reassign auto-incremented values?
2082 ------------------------------------------------
2084 Some users prefer their AUTO_INCREMENT values to be consecutive; this is not
2085 always the case after row deletion.
2087 Here are the steps to accomplish this. These are manual steps because they
2088 involve a manual verification at one point.
2090 * Ensure that you have exclusive access to the table to rearrange
2092 * On your :term:`primary key` column (i.e. id), remove the AUTO_INCREMENT setting
2094 * Delete your primary key in Structure > indexes
2096 * Create a new column future_id as primary key, AUTO_INCREMENT
2098 * Browse your table and verify that the new increments correspond to what
2099   you're expecting
2101 * Drop your old id column
2103 * Rename the future_id column to id
2105 * Move the new id column via Structure > Move columns
2107 .. _faq6_39:
2109 6.39 What is the "Adjust privileges" option when renaming, copying, or moving a database, table, column, or procedure?
2110 ----------------------------------------------------------------------------------------------------------------------
2112 When renaming/copying/moving a database/table/column/procedure,
2113 MySQL does not adjust the original privileges relating to these objects
2114 on its own. By selecting this option, phpMyAdmin will adjust the privilege
2115 table so that users have the same privileges on the new items.
2117 For example: A user 'bob'@'localhost' has a 'SELECT' privilege on a
2118 column named 'id'. Now, if this column is renamed to 'id_new', MySQL,
2119 on its own, would **not** adjust the column privileges to the new column name.
2120 phpMyAdmin can make this adjustment for you automatically.
2122 Notes:
2124 * While adjusting privileges for a database, the privileges of all
2125   database-related elements (tables, columns and procedures) are also adjusted
2126   to the database's new name.
2128 * Similarly, while adjusting privileges for a table, the privileges of all
2129   the columns inside the new table are also adjusted.
2131 * While adjusting privileges, the user performing the operation **must** have the following
2132   privileges:
2134   * SELECT, INSERT, UPDATE, DELETE privileges on following tables:
2135     `mysql`.`db`, `mysql`.`columns_priv`, `mysql`.`tables_priv`, `mysql`.`procs_priv`
2136   * FLUSH privilege (GLOBAL)
2138 Thus, if you want to replicate the database/table/column/procedure as it is
2139 while renaming/copying/moving these objects, make sure you have checked this option.
2141 .. _faq6_40:
2143 6.40 I see "Bind parameters" checkbox in the "SQL" page. How do I write parameterized SQL queries?
2144 --------------------------------------------------------------------------------------------------
2146 From version 4.5, phpMyAdmin allows users to execute parameterized queries in the "SQL" page.
2147 Parameters should be prefixed with a colon(:) and when the "Bind parameters" checkbox is checked
2148 these parameters will be identified and input fields for these parameters will be presented.
2149 Values entered in these field will be substituted in the query before being executed.
2151 .. _faq6_41:
2153 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 ?
2154 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2156 If you get errors like *#1031 - Table storage engine for 'table_name' doesn't have this option*
2157 while importing the dumps exported from pre-5.7.7 MySQL servers into new MySQL server versions 5.7.7+,
2158 it might be because ROW_FORMAT=FIXED is not supported with InnoDB tables. Moreover, the value of
2159 `innodb_strict_mode <https://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.
2161 Since MySQL version 5.7.9, the default value for `innodb_strict_mode` is `ON` and thus would generate
2162 an error when such a CREATE TABLE or ALTER TABLE statement is encountered.
2164 There are two ways of preventing such errors while importing:
2166 * Change the value of `innodb_strict_mode` to `OFF` before starting the import and turn it `ON` after
2167   the import is successfully completed.
2168 * This can be achieved in two ways:
2170   * Go to 'Variables' page and edit the value of `innodb_strict_mode`
2171   * Run the query : `SET GLOBAL `innodb_strict_mode` = '[value]'`
2173 After the import is done, it is suggested that the value of `innodb_strict_mode` should be reset to the
2174 original value.
2176 .. _faqproject:
2178 phpMyAdmin project
2179 ++++++++++++++++++
2181 .. _faq7_1:
2183 7.1 I have found a bug. How do I inform developers?
2184 ---------------------------------------------------
2186 Our issues tracker is located at <https://github.com/phpmyadmin/phpmyadmin/issues>.
2187 For security issues, please refer to the instructions at <https://www.phpmyadmin.net/security> to email
2188 the developers directly.
2190 .. _faq7_2:
2192 7.2 I want to translate the messages to a new language or upgrade an existing language, where do I start?
2193 ---------------------------------------------------------------------------------------------------------
2195 Translations are very welcome and all you need to have are the
2196 language skills. The easiest way is to use our `online translation
2197 service <https://hosted.weblate.org/projects/phpmyadmin/>`_. You can check
2198 out all the possibilities to translate in the `translate section on
2199 our website <https://www.phpmyadmin.net/translate/>`_.
2201 .. _faq7_3:
2203 7.3 I would like to help out with the development of phpMyAdmin. How should I proceed?
2204 --------------------------------------------------------------------------------------
2206 We welcome every contribution to the development of phpMyAdmin. You
2207 can check out all the possibilities to contribute in the `contribute
2208 section on our website
2209 <https://www.phpmyadmin.net/contribute/>`_.
2211 .. seealso:: :ref:`developers`
2213 .. _faqsecurity:
2215 Security
2216 ++++++++
2218 .. _faq8_1:
2220 8.1 Where can I get information about the security alerts issued for phpMyAdmin?
2221 --------------------------------------------------------------------------------
2223 Please refer to <https://www.phpmyadmin.net/security/>.
2225 .. _faq8_2:
2227 8.2 How can I protect phpMyAdmin against brute force attacks?
2228 -------------------------------------------------------------
2230 If you use Apache web server, phpMyAdmin exports information about
2231 authentication to the Apache environment and it can be used in Apache
2232 logs. Currently there are two variables available:
2234 ``userID``
2235     User name of currently active user (they do not have to be logged in).
2236 ``userStatus``
2237     Status of currently active user, one of ``ok`` (user is logged in),
2238     ``mysql-denied`` (MySQL denied user login), ``allow-denied`` (user denied
2239     by allow/deny rules), ``root-denied`` (root is denied in configuration),
2240     ``empty-denied`` (empty password is denied).
2242 ``LogFormat`` directive for Apache can look like following:
2244 .. code-block:: apache
2246     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{userID}n %{userStatus}n"   pma_combined
2248 You can then use any log analyzing tools to detect possible break-in
2249 attempts.
2251 .. _faq8_3:
2253 8.3 Why are there path disclosures when directly loading certain files?
2254 -----------------------------------------------------------------------
2256 This is a server configuration problem. Never enable ``display_errors`` on a production site.
2258 .. _faq8_4:
2260 8.4 CSV files exported from phpMyAdmin could allow a formula injection attack.
2261 ------------------------------------------------------------------------------
2263 It is possible to generate a :term:`CSV` file that, when imported to a spreadsheet program such as Microsoft Excel,
2264 could potentially allow the execution of arbitrary commands.
2266 The CSV files generated by phpMyAdmin could potentially contain text that would be interpreted by a spreadsheet program as
2267 a formula, but we do not believe escaping those fields is the proper behavior. There is no means to properly escape and
2268 differentiate between a desired text output and a formula that should be escaped, and CSV is a text format where function
2269 definitions should not be interpreted anyway. We have discussed this at length and feel it is the responsibility of the
2270 spreadsheet program to properly parse and sanitize such data on input instead.
2272 Google also has a `similar view <https://sites.google.com/site/bughunteruniversity/nonvuln/csv-excel-formula-injection>`_.
2274 .. _faqsynchronization:
2276 Synchronization
2277 +++++++++++++++
2279 .. _faq9_1:
2281 9.1 (withdrawn).
2282 ----------------
2284 .. _faq9_2:
2286 9.2 (withdrawn).
2287 ----------------