InnoDB Migration and sql TEXT field standardization, take 3.
[openemr.git] / phpmyadmin / doc / setup.rst
bloba6912cb618155d7de25126d12a74487f46b35cc4
1 .. _setup:
3 Installation
4 ============
6 phpMyAdmin does not apply any special security methods to the MySQL
7 database server. It is still the system administrator's job to grant
8 permissions on the MySQL databases properly. phpMyAdmin's :guilabel:`Users`
9 page can be used for this.
11 .. warning::
13     :term:`Mac` users should note that if you are on a version before
14     :term:`Mac OS X`, StuffIt unstuffs with :term:`Mac` formats. So you'll have
15     to resave as in BBEdit to Unix style ALL phpMyAdmin scripts before
16     uploading them to your server, as PHP seems not to like :term:`Mac`-style
17     end of lines character ("``\r``").
19 Linux distributions
20 +++++++++++++++++++
22 phpMyAdmin is included in most Linux distributions. It is recommended to use
23 distribution packages when possible - they usually provide integration to your
24 distribution and you will automatically get security updates from your distribution.
27 Debian
28 ------
30 Debian's package repositories include a phpMyAdmin package, but be aware that
31 the configuration file is maintained in ``/etc/phpmyadmin`` and may differ in
32 some ways from the official phpMyAdmin documentation.
34 OpenSUSE
35 --------
37 OpenSUSE already comes with phpMyAdmin package, just install packages from
38 the `openSUSE Build Service <http://software.opensuse.org/package/phpMyAdmin>`_.
40 Ubuntu
41 ------
43 Ubuntu ships phpMyAdmin package, however if you want to use recent version, you
44 can use packages from
45 `PPA for Michal Čihař <https://launchpad.net/~nijel/+archive/phpmyadmin>`_.
47 Gentoo
48 ------
50 Gentoo ships the phpMyAdmin package, both in a near stock configuration as well
51 as in a ``webapp-config`` configuration. Use ``emerge dev-db/phpmyadmin`` to
52 install.
54 Mandriva
55 --------
57 Mandriva ships the phpMyAdmin package in their ``contrib`` branch and can be
58 installed via the usual Control Center.
60 Fedora
61 ------
63 Fedora ships the phpMyAdmin package, but be aware that the configuration file
64 is maintained in ``/etc/phpMyAdmin/`` and may differ in some ways from the
65 official phpMyAdmin documentation.
67 Red Hat Enterprise Linux
68 ------------------------
70 Red Hat Enterprise Linux itself and thus derivatives like CentOS don't
71 ship phpMyAdmin, but the Fedora-driven repository
72 `Extra Packages for Enterprise Linux (EPEL) <http://fedoraproject.org/wiki/EPEL>`_
73 is doing so, if it's
74 `enabled <http://fedoraproject.org/wiki/EPEL/FAQ#howtouse>`_.
75 But be aware that the configuration file is maintained in
76 ``/etc/phpMyAdmin/`` and may differ in some ways from the
77 official phpMyAdmin documentation.
80 Installing on Windows
81 +++++++++++++++++++++
83 The easiest way to get phpMyAdmin on Windows is using third party products
84 which include phpMyAdmin together with a database and web server such as
85 `XAMPP <http://www.apachefriends.org/en/xampp.html>`_.
87 You can find more of such options at `Wikipedia <https://en.wikipedia.org/wiki/List_of_AMP_packages>`_.
90 .. _quick_install:
92 Quick Install
93 +++++++++++++
95 #. Choose an appropriate distribution kit from the phpmyadmin.net
96    Downloads page. Some kits contain only the English messages, others
97    contain all languages. We'll assume you chose a kit whose name
98    looks like ``phpMyAdmin-x.x.x -all-languages.tar.gz``.
99 #. Ensure you have downloaded a genuine archive, see :ref:`verify`.
100 #. Untar or unzip the distribution (be sure to unzip the subdirectories):
101    ``tar -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz`` in your
102    webserver's document root. If you don't have direct access to your
103    document root, put the files in a directory on your local machine,
104    and, after step 4, transfer the directory on your web server using,
105    for example, ftp.
106 #. Ensure that all the scripts have the appropriate owner (if PHP is
107    running in safe mode, having some scripts with an owner different from
108    the owner of other scripts will be a problem). See :ref:`faq4_2` and
109    :ref:`faq1_26` for suggestions.
110 #. Now you must configure your installation. There are two methods that
111    can be used. Traditionally, users have hand-edited a copy of
112    :file:`config.inc.php`, but now a wizard-style setup script is provided
113    for those who prefer a graphical installation. Creating a
114    :file:`config.inc.php` is still a quick way to get started and needed for
115    some advanced features.
118 Manually creating the file
119 --------------------------
121 To manually create the file, simply use your text editor to create the
122 file :file:`config.inc.php` (you can copy :file:`config.sample.inc.php` to get
123 a minimal configuration file) in the main (top-level) phpMyAdmin
124 directory (the one that contains :file:`index.php`). phpMyAdmin first
125 loads :file:`libraries/config.default.php` and then overrides those values
126 with anything found in :file:`config.inc.php`. If the default value is
127 okay for a particular setting, there is no need to include it in
128 :file:`config.inc.php`. You'll probably need only a few directives to get going; a
129 simple configuration may look like this:
131 .. code-block:: xml+php
134     <?php
135     $cfg['blowfish_secret'] = 'ba17c1ec07d65003';  // use here a value of your choice
137     $i=0;
138     $i++;
139     $cfg['Servers'][$i]['auth_type']     = 'cookie';
140     ?>
142 Or, if you prefer to not be prompted every time you log in:
144 .. code-block:: xml+php
147     <?php
149     $i=0;
150     $i++;
151     $cfg['Servers'][$i]['user']          = 'root';
152     $cfg['Servers'][$i]['password']      = 'cbb74bc'; // use here your password
153     $cfg['Servers'][$i]['auth_type']     = 'config';
154     ?>
156 For a full explanation of possible configuration values, see the
157 :ref:`config` of this document.
159 .. index:: Setup script
161 .. _setup_script:
163 Using Setup script
164 ------------------
166 Instead of manually editing :file:`config.inc.php`, you can use phpMyAdmin's 
167 setup feature. First you must manually create a folder ``config``
168 in the phpMyAdmin directory. This is a security measure. On a
169 Linux/Unix system you can use the following commands:
171 .. code-block:: sh
174     cd phpMyAdmin
175     mkdir config                        # create directory for saving
176     chmod o+rw config                   # give it world writable permissions
178 And to edit an existing configuration, copy it over first:
180 .. code-block:: sh
183     cp config.inc.php config/           # copy current configuration for editing
184     chmod o+w config/config.inc.php     # give it world writable permissions
186 .. note::
188     Debian and Ubuntu have simplified this setup and all you need to do is to
189     execute :program:`/usr/sbin/pma-configure`.
191 On other platforms, simply create the folder and ensure that your web
192 server has read and write access to it. :ref:`faq1_26` can help with
193 this.
195 Next, open your browser and visit the location where you installed phpMyAdmin, with the ``/setup`` suffix. If you have an existing configuration,
196 use the ``Load`` button to bring its content inside the setup panel.
197 Note that **changes are not saved to disk until you explicitly choose ``Save``**
198 from the *Configuration* area of the screen. Normally the script saves the new
199 :file:`config.inc.php` to the ``config/`` directory, but if the webserver does
200 not have the proper permissions you may see the error "Cannot load or
201 save configuration." Ensure that the ``config/`` directory exists and
202 has the proper permissions - or use the ``Download`` link to save the
203 config file locally and upload it (via FTP or some similar means) to the
204 proper location.
206 Once the file has been saved, it must be moved out of the ``config/``
207 directory and the permissions must be reset, again as a security
208 measure:
210 .. code-block:: sh
213     mv config/config.inc.php .         # move file to current directory
214     chmod o-rw config.inc.php          # remove world read and write permissions
215     rm -rf config                      # remove not needed directory
217 .. note::
219     Debian and Ubuntu have simplified this setup and all you need to do is to
220     execute :program:`/usr/sbin/pma-secure`.
222 Now the file is ready to be used. You can choose to review or edit the
223 file with your favorite editor, if you prefer to set some advanced
224 options which the setup script does not provide.
226 #. If you are using the ``auth_type`` "config", it is suggested that you
227    protect the phpMyAdmin installation directory because using config
228    does not require a user to enter a password to access the phpMyAdmin
229    installation. Use of an alternate authentication method is
230    recommended, for example with HTTP–AUTH in a :term:`.htaccess` file or switch to using
231    ``auth_type`` cookie or http. See the :ref:`faqmultiuser`
232    for additional information, especially :ref:`faq4_4`.
233 #. Open the `main phpMyAdmin directory <index.php>`_ in your browser.
234    phpMyAdmin should now display a welcome screen and your databases, or
235    a login dialog if using :term:`HTTP` or
236    cookie authentication mode.
237 #. You should deny access to the ``./libraries`` and ``./setup/lib``
238    subfolders in your webserver configuration.
239    Such configuration prevents from possible
240    path exposure and cross side scripting vulnerabilities that might
241    happen to be found in that code. For the Apache webserver, this is
242    often accomplished with a :term:`.htaccess` file in those directories.
243 #. It is generally a good idea to protect a public phpMyAdmin installation
244    against access by robots as they usually can not do anything good
245    there. You can do this using ``robots.txt`` file in root of your
246    webserver or limit access by web server configuration, see
247    :ref:`faq1_42`.
250 .. _verify:
252 Verifying phpMyAdmin releases
253 +++++++++++++++++++++++++++++
255 Since July 2015 all phpMyAdmin releases are cryptographically signed by the
256 releasing developer, who is currently Marc Delisle. His key id is
257 0x81AF644A, his PGP fingerprint is:
259 .. code-block:: console
261     436F F188 4B1A 0C3F DCBF 0D79 FEFC 65D1 81AF 644A
263 and you can get more identification information from `https://keybase.io/lem9 <https://keybase.io/lem9>`_.  You should verify that the signature matches
264 the archive you have downloaded. This way you can be sure that you are using
265 the same code that was released.
267 Each archive is accompanied with ``.asc`` files which contains the PGP signature
268 for it. Once you have both of them in the same folder, you can verify the signature:
270 .. code-block:: console
272     $ gpg --verify phpMyAdmin-4.4.9-all-languages.zip.asc
273     gpg: Signature made Fri Jun 12 13:09:58 2015 CEST using RSA key ID 81AF644A
274     gpg: Can't check signature: No public key
276 As you can see gpg complains that it does not know the public key. At this
277 point you should do one of the following steps:
279 * Download the keyring from `our download server <https://files.phpmyadmin.net/phpmyadmin.keyring>`_, then import it with:
281 .. code-block:: console
283    $ gpg --import phpmyadmin.keyring
285 * Download and import the key from one of the key servers:
287 .. code-block:: console
289     $ gpg --keyserver hkp://pgp.mit.edu --recv-keys 81AF644A
290     gpg: requesting key 81AF644A from hkp server pgp.mit.edu
291     gpg: key 81AF644A: public key "Marc Delisle <marc@infomarc.info>" imported
292     gpg: no ultimately trusted keys found
293     gpg: Total number processed: 1
294     gpg:               imported: 1  (RSA: 1)
296 This will improve the situation a bit - at this point you can verify that the
297 signature from the given key is correct but you still can not trust the name used
298 in the key:
300 .. code-block:: console
302     $ gpg --verify phpMyAdmin-4.4.9-all-languages.zip.asc
303     gpg: Signature made Fri Jun 12 13:09:58 2015 CEST using RSA key ID 81AF644A
304     gpg: Good signature from "Marc Delisle <marc@infomarc.info>" [unknown]
305     gpg: WARNING: This key is not certified with a trusted signature!
306     gpg:          There is no indication that the signature belongs to the owner.
307     Primary key fingerprint: 436F F188 4B1A 0C3F DCBF  0D79 FEFC 65D1 81AF 644A
309 The problem here is that anybody could issue the key with this name.  You need to
310 ensure that the key is actually owned by the mentioned person.  The GNU Privacy
311 Handbook covers this topic in the chapter `Validating other keys on your public
312 keyring`_. The most reliable method is to meet the developer in person and
313 exchange key fingerprints, however you can also rely on the web of trust. This way
314 you can trust the key transitively though signatures of others, who have met
315 the developer in person. For example you can see how `Marc's key links to
316 Linus's key`_.
318 Once the key is trusted, the warning will not occur:
320 .. code-block:: console
322     $ gpg --verify phpMyAdmin-4.4.9-all-languages.zip.asc
323     gpg: Signature made Fri Jun 12 13:09:58 2015 CEST using RSA key ID 81AF644A
324     gpg: Good signature from "Marc Delisle <marc@infomarc.info>" [full]
326 Should the signature be invalid (the archive has been changed), you would get a
327 clear error regardless of the fact that the key is trusted or not:
329 .. code-block:: console
331     $ gpg --verify phpMyAdmin-4.4.9-all-languages.zip.asc
332     gpg: Signature made Fri Jun 12 13:09:58 2015 CEST using RSA key ID 81AF644A
333     gpg: BAD signature from "Marc Delisle <marc@infomarc.info>" [unknown]
335 .. _Validating other keys on your public keyring: https://www.gnupg.org/gph/en/manual.html#AEN335
337 .. _Marc's key links to Linus's key: http://pgp.cs.uu.nl/mk_path.cgi?FROM=00411886&TO=81AF644A
340 .. index::
341     single: Configuration storage
342     single: phpMyAdmin configuration storage
343     single: pmadb
345 .. _linked-tables:
347 phpMyAdmin configuration storage
348 ++++++++++++++++++++++++++++++++
350 For a whole set of additional features (bookmarks, comments, :term:`SQL`-history,
351 tracking mechanism, :term:`PDF`-generation, column contents transformation,
352 etc.) you need to create a set of special tables.  Those tables can be located
353 in your own database, or in a central database for a multi-user installation
354 (this database would then be accessed by the controluser, so no other user
355 should have rights to it).
357 Zero configuration
358 ------------------
360 In many cases, this database structure can be automatically created and
361 configured. This is called “Zero Configuration” mode and can be particularly
362 useful in shared hosting situations. “Zeroconf” mode is on by default, to
363 disable set :config:option:`$cfg['ZeroConf']` to false.
365 The following three scenarios are covered by the Zero Configuration mode:
367 * When entering a database where the configuration storage tables are not
368   present, phpMyAdmin offers to create them from the Operations tab.
369 * When entering a database where the tables do already exist, the software
370   automatically detects this and begins using them. This is the most common
371   situation; after the tables are initially created automatically they are
372   continually used without disturbing the user; this is also most useful on
373   shared hosting where the user is not able to edit :file:`config.inc.php` and
374   usually the user only has access to one database.
375 * When having access to multiple databases, if the user first enters the
376   database containing the configuration storage tables then switches to
377   another database,
378   phpMyAdmin continues to use the tables from the first database; the user is
379   not prompted to create more tables in the new database.
382 Manual configuration
383 --------------------
385 Please look at your ``./sql/`` directory, where you should find a
386 file called *create\_tables.sql*. (If you are using a Windows server,
387 pay special attention to :ref:`faq1_23`).
389 If you already had this infrastructure and:
391 * upgraded to MySQL 4.1.2 or newer, please use
392   :file:`sql/upgrade_tables_mysql_4_1_2+.sql`.
393 * upgraded to phpMyAdmin 4.3.0 or newer from 2.5.0 or newer (<= 4.2.x),
394   please use :file:`sql/upgrade_column_info_4_3_0+.sql`.
396 and then create new tables by importing :file:`sql/create_tables.sql`.
398 You can use your phpMyAdmin to create the tables for you. Please be
399 aware that you may need special (administrator) privileges to create
400 the database and tables, and that the script may need some tuning,
401 depending on the database name.
403 After having imported the :file:`sql/create_tables.sql` file, you
404 should specify the table names in your :file:`config.inc.php` file. The
405 directives used for that can be found in the :ref:`config`.
407 You will also need to have a controluser
408 (:config:option:`$cfg['Servers'][$i]['controluser']` and
409 :config:option:`$cfg['Servers'][$i]['controlpass']` settings)
410 with the proper rights to those tables. For example you can create it
411 using following statement:
413 .. code-block:: mysql
415    GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost'  IDENTIFIED BY 'pmapass';
417 .. _upgrading:
419 Upgrading from an older version
420 +++++++++++++++++++++++++++++++
422 **Never** extract the new version over an existing installation
423 of phpMyAdmin; we had evidence of problems caused by this.
425 Simply copy :file:`config.inc.php` from your previous installation into
426 the newly unpacked one. Configuration files from old versions may
427 require some tweaking as some options have been changed or removed.
428 For compatibility with PHP 5.3 and later, remove a
429 ``set_magic_quotes_runtime(0);`` statement that you might find near
430 the end of your configuration file.
432 You should **not** copy :file:`libraries/config.default.php` over
433 :file:`config.inc.php` because the default configuration file is version-
434 specific.
436 If you have upgraded your MySQL server from a version previous to 4.1.2 to
437 version 5.x or newer and if you use the phpMyAdmin configuration storage, you
438 should run the :term:`SQL` script found in
439 :file:`sql/upgrade_tables_mysql_4_1_2+.sql`.
441 If you have upgraded your phpMyAdmin to 4.3.0 or newer from 2.5.0 or
442 newer (<= 4.2.x) and if you use the phpMyAdmin configuration storage, you
443 should run the :term:`SQL` script found in
444 :file:`sql/upgrade_column_info_4_3_0+.sql`.
446 Do not forget to clear the browser cache and to empty the old session by
447 logging out and logging in again.
449 .. index:: Authentication mode
451 .. _authentication_modes:
453 Using authentication modes
454 ++++++++++++++++++++++++++
456 :term:`HTTP` and cookie authentication modes are recommended in a **multi-user
457 environment** where you want to give users access to their own database and
458 don't want them to play around with others. Nevertheless be aware that MS
459 Internet Explorer seems to be really buggy about cookies, at least till version
460 6. Even in a **single-user environment**, you might prefer to use :term:`HTTP`
461 or cookie mode so that your user/password pair are not in clear in the
462 configuration file.
464 :term:`HTTP` and cookie authentication
465 modes are more secure: the MySQL login information does not need to be
466 set in the phpMyAdmin configuration file (except possibly for the
467 :config:option:`$cfg['Servers'][$i]['controluser']`).
468 However, keep in mind that the password travels in plain text, unless
469 you are using the HTTPS protocol. In cookie mode, the password is
470 stored, encrypted with the AES algorithm, in a temporary cookie.
472 Then each of the *true* users should be granted a set of privileges
473 on a set of particular databases. Normally you shouldn't give global
474 privileges to an ordinary user, unless you understand the impact of those
475 privileges (for example, you are creating a superuser).
476 For example, to grant the user *real_user* with all privileges on
477 the database *user_base*:
479 .. code-block:: mysql
481    GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password';
484 What the user may now do is controlled entirely by the MySQL user management
485 system. With HTTP or cookie authentication mode, you don't need to fill the
486 user/password fields inside the :config:option:`$cfg['Servers']`.
488 .. index:: pair: HTTP; Authentication mode
490 HTTP authentication mode
491 ------------------------
493 * Uses :term:`HTTP` Basic authentication
494   method and allows you to log in as any valid MySQL user.
495 * Is supported with most PHP configurations. For :term:`IIS` (:term:`ISAPI`)
496   support using :term:`CGI` PHP see :ref:`faq1_32`, for using with Apache
497   :term:`CGI` see :ref:`faq1_35`.
498 * See also :ref:`faq4_4` about not using the :term:`.htaccess` mechanism along with
499   ':term:`HTTP`' authentication mode.
501 .. index:: pair: Cookie; Authentication mode
503 .. _cookie:
505 Cookie authentication mode
506 --------------------------
508 * Username and password are stored in cookies during the session and password
509   is deleted when it ends.
510 * With this mode, the user can truly log out of phpMyAdmin and log
511   back in with the same username.
512 * If you want to allow users to enter any hostname to connect (rather than only
513   servers that are configured in :file:`config.inc.php`),
514   see the :config:option:`$cfg['AllowArbitraryServer']` directive.
515 * As mentioned in the :ref:`require` section, having the ``mcrypt`` extension will
516   speed up access considerably, but is not required.
518 .. index:: pair: Signon; Authentication mode
520 .. _auth_signon:
522 Signon authentication mode
523 --------------------------
525 * This mode is a convenient way of using credentials from another
526   application to authenticate to phpMyAdmin to implement single signon
527   solution.
528 * The other application has to store login information into session
529   data (see :config:option:`$cfg['Servers'][$i]['SignonSession']`) or you
530   need to implement script to return the credentials (see
531   :config:option:`$cfg['Servers'][$i]['SignonScript']`).
532 * When no credentials are available, the user is being redirected to
533   :config:option:`$cfg['Servers'][$i]['SignonURL']`, where you should handle
534   the login process.
536 The very basic example of saving credentials in a session is available as
537 :file:`examples/signon.php`:
539 .. literalinclude:: ../examples/signon.php
540     :language: php
542 Alternatively you can also use this way to integrate with OpenID as shown
543 in :file:`examples/openid.php`:
545 .. literalinclude:: ../examples/openid.php
546     :language: php
548 If you intend to pass the credentials using some other means than, you have to
549 implement wrapper in PHP to get that data and set it to
550 :config:option:`$cfg['Servers'][$i]['SignonScript']`. There is very minimal example
551 in :file:`examples/signon-script.php`:
553 .. literalinclude:: ../examples/signon-script.php
554     :language: php
556 .. seealso::
557     :config:option:`$cfg['Servers'][$i]['auth_type']`,
558     :config:option:`$cfg['Servers'][$i]['SignonSession']`,
559     :config:option:`$cfg['Servers'][$i]['SignonScript']`,
560     :config:option:`$cfg['Servers'][$i]['SignonURL']`
563 .. index:: pair: Config; Authentication mode
565 Config authentication mode
566 --------------------------
568 * This mode is sometimes the less secure one because it requires you to fill the
569   :config:option:`$cfg['Servers'][$i]['user']` and
570   :config:option:`$cfg['Servers'][$i]['password']`
571   fields (and as a result, anyone who can read your :file:`config.inc.php`
572   can discover your username and password).
573 * In the :ref:`faqmultiuser` section, there is an entry explaining how
574   to protect your configuration file.
575 * For additional security in this mode, you may wish to consider the
576   Host authentication :config:option:`$cfg['Servers'][$i]['AllowDeny']['order']`
577   and :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` configuration directives.
578 * Unlike cookie and http, does not require a user to log in when first
579   loading the phpMyAdmin site. This is by design but could allow any
580   user to access your installation. Use of some restriction method is
581   suggested, perhaps a :term:`.htaccess` file with the HTTP-AUTH directive or disallowing
582   incoming HTTP requests at one’s router or firewall will suffice (both
583   of which are beyond the scope of this manual but easily searchable
584   with Google).
586 .. index:: pair: Swekey; Authentication mode
588 .. _swekey:
590 Swekey authentication mode
591 --------------------------
593 The Swekey is a low cost authentication USB key that can be used in
594 web applications. When Swekey authentication is activated, phpMyAdmin
595 requires the users's Swekey to be plugged before entering the login
596 page (currently supported for cookie authentication mode only). Swekey
597 Authentication is disabled by default. To enable it, add the following
598 line to :file:`config.inc.php`:
600 .. code-block:: php
602     $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey.conf';
604 You then have to create the ``swekey.conf`` file that will associate
605 each user with their Swekey Id. It is important to place this file
606 outside of your web server's document root (in the example, it is
607 located in ``/etc``). Feel free to use it with your own users'
608 information. If you want to purchase a Swekey please visit
609 `https://www.phpmyadmin.net/auth\_key/ <https://www.phpmyadmin.net/auth_key/>`_
610 since this link provides funding for phpMyAdmin.
612 A self documented sample file is provided in the
613 file :file:`examples/swekey.sample.conf`:
615 .. literalinclude:: ../examples/swekey.sample.conf
616     :language: sh
618 .. seealso:: :config:option:`$cfg['Servers'][$i]['auth_swekey_config']`
621 Securing your phpMyAdmin installation
622 +++++++++++++++++++++++++++++++++++++
624 The phpMyAdmin team tries hard to make the application secure, however there
625 are always ways to make your installation more secure:
627 * Remove the ``setup`` directory from phpMyAdmin, you will probably not
628   use it after the initial setup.
629 * Properly choose an authentication method - :ref:`cookie`
630   is probably the best choice for shared hosting.
631 * In case you don't want all MySQL users to be able to access
632   phpMyAdmin, you can use :config:option:`$cfg['Servers'][$i]['AllowDeny']['rules']` to limit them.
633 * Consider hiding phpMyAdmin behind an authentication proxy, so that
634   users need to authenticate prior to providing MySQL credentials
635   to phpMyAdmin. You can achieve this by configuring your web server to request
636   HTTP authentication. For example in Apache this can be done with:
637     
638   .. code-block:: apache
640      AuthType Basic
641      AuthName "Restricted Access"
642      AuthUserFile /usr/share/phpmyadmin/passwd
643      Require valid-user
645   Once you have changed the configuration, you need to create a list of users which
646   can authenticate. This can be done using the :program:`htpasswd` utility:
648   .. code-block:: sh
650      htpasswd -c /usr/share/phpmyadmin/passwd username
652 * If you are afraid of automated attacks, enabling Captcha by
653   :config:option:`$cfg['CaptchaLoginPublicKey']` and
654   :config:option:`$cfg['CaptchaLoginPrivateKey']` might be an option.