-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.html
More file actions
1584 lines (1502 loc) · 133 KB
/
Copy pathsetup.html
File metadata and controls
1584 lines (1502 loc) · 133 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Installation — phpMyAdmin 5.2.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Configuration" href="config.html" />
<link rel="prev" title="Requirements" href="require.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="config.html" title="Configuration"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="require.html" title="Requirements"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.1 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">Installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<span id="setup"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>phpMyAdmin does not apply any special security methods to the MySQL
database server. It is still the system administrator’s job to grant
permissions on the MySQL databases properly. phpMyAdmin’s <span class="guilabel">Users</span>
page can be used for this.</p>
<div class="section" id="linux-distributions">
<h2>Linux distributions<a class="headerlink" href="#linux-distributions" title="Permalink to this headline">¶</a></h2>
<p>phpMyAdmin is included in most Linux distributions. It is recommended to use
distribution packages when possible - they usually provide integration to your
distribution and you will automatically get security updates from your distribution.</p>
<div class="section" id="debian-and-ubuntu">
<span id="debian-package"></span><h3>Debian and Ubuntu<a class="headerlink" href="#debian-and-ubuntu" title="Permalink to this headline">¶</a></h3>
<p>Most Debian and Ubuntu versions include a phpMyAdmin package, but be aware that
the configuration file is maintained in <code class="docutils literal notranslate"><span class="pre">/etc/phpmyadmin</span></code> and may differ in
some ways from the official phpMyAdmin documentation. Specifically, it does:</p>
<ul class="simple">
<li><p>Configuration of a web server (works for Apache and lighttpd).</p></li>
<li><p>Creating of <a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> using dbconfig-common.</p></li>
<li><p>Securing setup script, see <a class="reference internal" href="#debian-setup"><span class="std std-ref">Setup script on Debian, Ubuntu and derivatives</span></a>.</p></li>
</ul>
<p>More specific details about installing Debian or Ubuntu packages are available
<a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu">in our wiki</a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>More information can be found in <a class="reference external" href="https://salsa.debian.org/phpmyadmin-team/phpmyadmin/blob/debian/latest/debian/README.Debian">README.Debian</a>
(it is installed as <code class="file docutils literal notranslate"><span class="pre">/usr/share/doc/phpmyadmin/README.Debian</span></code> with the package).</p>
</div>
</div>
<div class="section" id="opensuse">
<h3>OpenSUSE<a class="headerlink" href="#opensuse" title="Permalink to this headline">¶</a></h3>
<p>OpenSUSE already comes with phpMyAdmin package, just install packages from
the <a class="reference external" href="https://software.opensuse.org/package/phpMyAdmin">openSUSE Build Service</a>.</p>
</div>
<div class="section" id="gentoo">
<h3>Gentoo<a class="headerlink" href="#gentoo" title="Permalink to this headline">¶</a></h3>
<p>Gentoo ships the phpMyAdmin package, both in a near-stock configuration as well
as in a <code class="docutils literal notranslate"><span class="pre">webapp-config</span></code> configuration. Use <code class="docutils literal notranslate"><span class="pre">emerge</span> <span class="pre">dev-db/phpmyadmin</span></code> to
install.</p>
</div>
<div class="section" id="mandriva">
<h3>Mandriva<a class="headerlink" href="#mandriva" title="Permalink to this headline">¶</a></h3>
<p>Mandriva ships the phpMyAdmin package in their <code class="docutils literal notranslate"><span class="pre">contrib</span></code> branch and can be
installed via the usual Control Center.</p>
</div>
<div class="section" id="fedora">
<h3>Fedora<a class="headerlink" href="#fedora" title="Permalink to this headline">¶</a></h3>
<p>Fedora ships the phpMyAdmin package, but be aware that the configuration file
is maintained in <code class="docutils literal notranslate"><span class="pre">/etc/phpMyAdmin/</span></code> and may differ in some ways from the
official phpMyAdmin documentation.</p>
</div>
<div class="section" id="red-hat-enterprise-linux">
<h3>Red Hat Enterprise Linux<a class="headerlink" href="#red-hat-enterprise-linux" title="Permalink to this headline">¶</a></h3>
<p>Red Hat Enterprise Linux itself and thus derivatives like CentOS don’t
ship phpMyAdmin, but the Fedora-driven repository
<a class="reference external" href="https://fedoraproject.org/wiki/EPEL">Extra Packages for Enterprise Linux (EPEL)</a>
is doing so, if it’s
<a class="reference external" href="https://fedoraproject.org/wiki/EPEL/FAQ#howtouse">enabled</a>.
But be aware that the configuration file is maintained in
<code class="docutils literal notranslate"><span class="pre">/etc/phpMyAdmin/</span></code> and may differ in some ways from the
official phpMyAdmin documentation.</p>
</div>
</div>
<div class="section" id="installing-on-windows">
<h2>Installing on Windows<a class="headerlink" href="#installing-on-windows" title="Permalink to this headline">¶</a></h2>
<p>The easiest way to get phpMyAdmin on Windows is using third party products
which include phpMyAdmin together with a database and web server such as
<a class="reference external" href="https://www.apachefriends.org/index.html">XAMPP</a>.</p>
<p>You can find more of such options at <a class="reference external" href="https://en.wikipedia.org/wiki/List_of_AMP_packages">Wikipedia</a>.</p>
</div>
<div class="section" id="installing-from-git">
<h2>Installing from Git<a class="headerlink" href="#installing-from-git" title="Permalink to this headline">¶</a></h2>
<p>In order to install from Git, you’ll need a few supporting applications:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://git-scm.com/downloads">Git</a> to download the source, or you can download the most recent source directly from <a class="reference external" href="https://codeload.github.com/phpmyadmin/phpmyadmin/zip/QA_5_2">Github</a></p></li>
<li><p><a class="reference external" href="https://getcomposer.org/download/">Composer</a></p></li>
<li><p><a class="reference external" href="https://nodejs.org/en/download/">Node.js</a> (version 10 or higher)</p></li>
<li><p><a class="reference external" href="https://classic.yarnpkg.com/en/docs/install">Yarn</a></p></li>
</ul>
<p>You can clone current phpMyAdmin source from
<code class="docutils literal notranslate"><span class="pre">https://github.com/phpmyadmin/phpmyadmin.git</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/phpmyadmin/phpmyadmin.git
</pre></div>
</div>
<p>Additionally you need to install dependencies using <a class="reference external" href="https://getcomposer.org">Composer</a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer update
</pre></div>
</div>
<p>If you do not intend to develop, you can skip the installation of developer tools
by invoking:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer update --no-dev
</pre></div>
</div>
<p>Finally, you’ll need to use <a class="reference external" href="https://classic.yarnpkg.com/en/docs/install">Yarn</a> to install some JavaScript dependencies:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>yarn install --production
</pre></div>
</div>
</div>
<div class="section" id="installing-using-composer">
<span id="composer"></span><h2>Installing using Composer<a class="headerlink" href="#installing-using-composer" title="Permalink to this headline">¶</a></h2>
<p>You can install phpMyAdmin using the <a class="reference external" href="https://getcomposer.org/">Composer tool</a>, since 4.7.0 the releases
are automatically mirrored to the default <a class="reference external" href="https://packagist.org/">Packagist</a> repository.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The content of the Composer repository is automatically generated
separately from the releases, so the content doesn’t have to be
100% same as when you download the tarball. There should be no
functional differences though.</p>
</div>
<p>To install phpMyAdmin simply run:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer create-project phpmyadmin/phpmyadmin
</pre></div>
</div>
<p>Alternatively you can use our own composer repository, which contains
the release tarballs and is available at
<<a class="reference external" href="https://www.phpmyadmin.net/packages.json">https://www.phpmyadmin.net/packages.json</a>>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer create-project phpmyadmin/phpmyadmin --repository-url<span class="o">=</span>https://www.phpmyadmin.net/packages.json --no-dev
</pre></div>
</div>
</div>
<div class="section" id="installing-using-docker">
<span id="docker"></span><h2>Installing using Docker<a class="headerlink" href="#installing-using-docker" title="Permalink to this headline">¶</a></h2>
<p>phpMyAdmin comes with a <a class="reference external" href="https://hub.docker.com/_/phpmyadmin">Docker official image</a>, which you can easily deploy. You can
download it using:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker pull phpmyadmin
</pre></div>
</div>
<p>The phpMyAdmin server will listen on port 80. It supports several ways of
configuring the link to the database server, either by Docker’s link feature
by linking your database container to <code class="docutils literal notranslate"><span class="pre">db</span></code> for phpMyAdmin (by specifying
<code class="docutils literal notranslate"><span class="pre">--link</span> <span class="pre">your_db_host:db</span></code>) or by environment variables (in this case it’s up
to you to set up networking in Docker to allow the phpMyAdmin container to access
the database container over the network).</p>
<div class="section" id="docker-environment-variables">
<span id="docker-vars"></span><h3>Docker environment variables<a class="headerlink" href="#docker-environment-variables" title="Permalink to this headline">¶</a></h3>
<p>You can configure several phpMyAdmin features using environment variables:</p>
<dl class="std envvar">
<dt id="envvar-PMA_ARBITRARY">
<code class="sig-name descname">PMA_ARBITRARY</code><a class="headerlink" href="#envvar-PMA_ARBITRARY" title="Permalink to this definition">¶</a></dt>
<dd><p>Allows you to enter a database server hostname on login form.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_AllowArbitraryServer"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['AllowArbitraryServer']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_HOST">
<code class="sig-name descname">PMA_HOST</code><a class="headerlink" href="#envvar-PMA_HOST" title="Permalink to this definition">¶</a></dt>
<dd><p>Hostname or IP address of the database server to use.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_Servers_host"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['host']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_HOSTS">
<code class="sig-name descname">PMA_HOSTS</code><a class="headerlink" href="#envvar-PMA_HOSTS" title="Permalink to this definition">¶</a></dt>
<dd><p>Comma-separated hostnames or IP addresses of the database servers to use.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Used only if <span class="target" id="index-2"></span><a class="reference internal" href="#envvar-PMA_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_HOST</span></code></a> is empty.</p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_VERBOSE">
<code class="sig-name descname">PMA_VERBOSE</code><a class="headerlink" href="#envvar-PMA_VERBOSE" title="Permalink to this definition">¶</a></dt>
<dd><p>Verbose name of the database server.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-3"></span><a class="reference internal" href="config.html#cfg_Servers_verbose"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['verbose']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_VERBOSES">
<code class="sig-name descname">PMA_VERBOSES</code><a class="headerlink" href="#envvar-PMA_VERBOSES" title="Permalink to this definition">¶</a></dt>
<dd><p>Comma-separated verbose name of the database servers.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Used only if <span class="target" id="index-4"></span><a class="reference internal" href="#envvar-PMA_VERBOSE"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_VERBOSE</span></code></a> is empty.</p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_USER">
<code class="sig-name descname">PMA_USER</code><a class="headerlink" href="#envvar-PMA_USER" title="Permalink to this definition">¶</a></dt>
<dd><p>User name to use for <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_PASSWORD">
<code class="sig-name descname">PMA_PASSWORD</code><a class="headerlink" href="#envvar-PMA_PASSWORD" title="Permalink to this definition">¶</a></dt>
<dd><p>Password to use for <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_PORT">
<code class="sig-name descname">PMA_PORT</code><a class="headerlink" href="#envvar-PMA_PORT" title="Permalink to this definition">¶</a></dt>
<dd><p>Port of the database server to use.</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_PORTS">
<code class="sig-name descname">PMA_PORTS</code><a class="headerlink" href="#envvar-PMA_PORTS" title="Permalink to this definition">¶</a></dt>
<dd><p>Comma-separated ports of the database server to use.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Used only if <span class="target" id="index-5"></span><a class="reference internal" href="#envvar-PMA_PORT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_PORT</span></code></a> is empty.</p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_ABSOLUTE_URI">
<code class="sig-name descname">PMA_ABSOLUTE_URI</code><a class="headerlink" href="#envvar-PMA_ABSOLUTE_URI" title="Permalink to this definition">¶</a></dt>
<dd><p>The fully-qualified path (<code class="docutils literal notranslate"><span class="pre">https://pma.example.net/</span></code>) where the reverse
proxy makes phpMyAdmin available.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-6"></span><a class="reference internal" href="config.html#cfg_PmaAbsoluteUri"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['PmaAbsoluteUri']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_QUERYHISTORYDB">
<code class="sig-name descname">PMA_QUERYHISTORYDB</code><a class="headerlink" href="#envvar-PMA_QUERYHISTORYDB" title="Permalink to this definition">¶</a></dt>
<dd><p>When set to <cite>true</cite>, enables storing SQL history to <span class="target" id="index-7"></span><a class="reference internal" href="config.html#cfg_Servers_pmadb"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['pmadb']</span></code></a>.
When <cite>false</cite>, history is stored in the browser and is cleared when logging out.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-8"></span><a class="reference internal" href="config.html#cfg_Servers_history"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['history']</span></code></a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-9"></span><a class="reference internal" href="config.html#cfg_QueryHistoryDB"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['QueryHistoryDB']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_QUERYHISTORYMAX">
<code class="sig-name descname">PMA_QUERYHISTORYMAX</code><a class="headerlink" href="#envvar-PMA_QUERYHISTORYMAX" title="Permalink to this definition">¶</a></dt>
<dd><p>When set to an integer, controls the number of history items.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-10"></span><a class="reference internal" href="config.html#cfg_QueryHistoryMax"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['QueryHistoryMax']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_CONTROLHOST">
<code class="sig-name descname">PMA_CONTROLHOST</code><a class="headerlink" href="#envvar-PMA_CONTROLHOST" title="Permalink to this definition">¶</a></dt>
<dd><p>When set, this points to an alternate database host used for storing the “<a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>” database.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-11"></span><a class="reference internal" href="config.html#cfg_Servers_controlhost"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controlhost']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_CONTROLUSER">
<code class="sig-name descname">PMA_CONTROLUSER</code><a class="headerlink" href="#envvar-PMA_CONTROLUSER" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines the username for phpMyAdmin to use for the “<a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>” database.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-12"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_CONTROLPASS">
<code class="sig-name descname">PMA_CONTROLPASS</code><a class="headerlink" href="#envvar-PMA_CONTROLPASS" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines the password for phpMyAdmin to use for the “<a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>” database.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-13"></span><a class="reference internal" href="config.html#cfg_Servers_controlpass"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controlpass']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_CONTROLPORT">
<code class="sig-name descname">PMA_CONTROLPORT</code><a class="headerlink" href="#envvar-PMA_CONTROLPORT" title="Permalink to this definition">¶</a></dt>
<dd><p>When set, will override the default port (<cite>3306</cite>) for connecting to the control host.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-14"></span><a class="reference internal" href="config.html#cfg_Servers_controlport"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controlport']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_PMADB">
<code class="sig-name descname">PMA_PMADB</code><a class="headerlink" href="#envvar-PMA_PMADB" title="Permalink to this definition">¶</a></dt>
<dd><p>When set, define the name of the database to be used for the “<a class="reference internal" href="#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>” database.
When not set, the advanced features are not enabled by default: they can still potentially be enabled by the user when logging in with the <a class="reference internal" href="#zeroconf"><span class="std std-ref">Zero configuration</span></a> feature.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Suggested values: <cite>phpmyadmin</cite> or <cite>pmadb</cite></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-15"></span><a class="reference internal" href="config.html#cfg_Servers_pmadb"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['pmadb']</span></code></a></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-HIDE_PHP_VERSION">
<code class="sig-name descname">HIDE_PHP_VERSION</code><a class="headerlink" href="#envvar-HIDE_PHP_VERSION" title="Permalink to this definition">¶</a></dt>
<dd><p>If defined, this option will hide the PHP version (<cite>expose_php = Off</cite>).
Set to any value (such as <cite>HIDE_PHP_VERSION=true</cite>).</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-UPLOAD_LIMIT">
<code class="sig-name descname">UPLOAD_LIMIT</code><a class="headerlink" href="#envvar-UPLOAD_LIMIT" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will override the default value for apache and php-fpm (this will change <code class="docutils literal notranslate"><span class="pre">upload_max_filesize</span></code> and <code class="docutils literal notranslate"><span class="pre">post_max_size</span></code> values).</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Format as <cite>[0-9+](K,M,G)</cite> default value is <cite>2048K</cite></p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-MEMORY_LIMIT">
<code class="sig-name descname">MEMORY_LIMIT</code><a class="headerlink" href="#envvar-MEMORY_LIMIT" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will override the phpMyAdmin memory limit <span class="target" id="index-16"></span><a class="reference internal" href="config.html#cfg_MemoryLimit"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['MemoryLimit']</span></code></a> and PHP’s <cite>memory_limit</cite>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Format as <cite>[0-9+](K,M,G)</cite> where <cite>K</cite> is for Kilobytes, <cite>M</cite> for Megabytes, <cite>G</cite> for Gigabytes and <cite>1K</cite> = 1024 bytes. Default value is <cite>512M</cite>.</p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-MAX_EXECUTION_TIME">
<code class="sig-name descname">MAX_EXECUTION_TIME</code><a class="headerlink" href="#envvar-MAX_EXECUTION_TIME" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will override the maximum execution time in seconds for phpMyAdmin <span class="target" id="index-17"></span><a class="reference internal" href="config.html#cfg_ExecTimeLimit"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['ExecTimeLimit']</span></code></a> and PHP’s <cite>max_execution_time</cite>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Format as <cite>[0-9+]</cite>. Default value is <cite>600</cite>.</p>
</div>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_CONFIG_BASE64">
<code class="sig-name descname">PMA_CONFIG_BASE64</code><a class="headerlink" href="#envvar-PMA_CONFIG_BASE64" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will override the default <cite>config.inc.php</cite> with the base64 decoded contents of the variable.</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_USER_CONFIG_BASE64">
<code class="sig-name descname">PMA_USER_CONFIG_BASE64</code><a class="headerlink" href="#envvar-PMA_USER_CONFIG_BASE64" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will override the default <cite>config.user.inc.php</cite> with the base64 decoded contents of the variable.</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_UPLOADDIR">
<code class="sig-name descname">PMA_UPLOADDIR</code><a class="headerlink" href="#envvar-PMA_UPLOADDIR" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will set the path where files can be saved to be available to import (<span class="target" id="index-18"></span><a class="reference internal" href="config.html#cfg_UploadDir"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['UploadDir']</span></code></a>)</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-PMA_SAVEDIR">
<code class="sig-name descname">PMA_SAVEDIR</code><a class="headerlink" href="#envvar-PMA_SAVEDIR" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will set the path where exported files can be saved (<span class="target" id="index-19"></span><a class="reference internal" href="config.html#cfg_SaveDir"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['SaveDir']</span></code></a>)</p>
</dd></dl>
<dl class="std envvar">
<dt id="envvar-APACHE_PORT">
<code class="sig-name descname">APACHE_PORT</code><a class="headerlink" href="#envvar-APACHE_PORT" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, this option will change the default Apache port from <cite>80</cite> in case you want it to run on a different port like an unprivileged port. Set to any port value (such as <cite>APACHE_PORT=8090</cite>).</p>
</dd></dl>
<p>By default, <a class="reference internal" href="#cookie"><span class="std std-ref">Cookie authentication mode</span></a> is used, but if <span class="target" id="index-20"></span><a class="reference internal" href="#envvar-PMA_USER"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_USER</span></code></a> and
<span class="target" id="index-21"></span><a class="reference internal" href="#envvar-PMA_PASSWORD"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_PASSWORD</span></code></a> are set, it is switched to <a class="reference internal" href="#auth-config"><span class="std std-ref">Config authentication mode</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The credentials you need to log in are stored in the MySQL server, in case
of Docker image, there are various ways to set it (for example
<code class="samp docutils literal notranslate"><span class="pre">MYSQL_ROOT_PASSWORD</span></code> when starting the MySQL container). Please check
documentation for <a class="reference external" href="https://hub.docker.com/_/mariadb">MariaDB container</a>
or <a class="reference external" href="https://hub.docker.com/_/mysql">MySQL container</a>.</p>
</div>
</div>
<div class="section" id="customizing-configuration">
<span id="docker-custom"></span><h3>Customizing configuration<a class="headerlink" href="#customizing-configuration" title="Permalink to this headline">¶</a></h3>
<p>Additionally configuration can be tweaked by <code class="file docutils literal notranslate"><span class="pre">/etc/phpmyadmin/config.user.inc.php</span></code>. If
this file exists, it will be loaded after configuration is generated from above
environment variables, so you can override any configuration variable. This
configuration can be added as a volume when invoking docker using
<cite>-v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php</cite> parameters.</p>
<p>Note that the supplied configuration file is applied after <a class="reference internal" href="#docker-vars"><span class="std std-ref">Docker environment variables</span></a>,
but you can override any of the values.</p>
<p>For example to change the default behavior of CSV export you can use the following
configuration file:</p>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="o"><?</span><span class="nx">php</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Export'</span><span class="p">][</span><span class="s1">'csv_columns'</span><span class="p">]</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span>
</pre></div>
</div>
<p>You can also use it to define server configuration instead of using the
environment variables listed in <a class="reference internal" href="#docker-vars"><span class="std std-ref">Docker environment variables</span></a>:</p>
<div class="highlight-php notranslate"><div class="highlight"><pre><span></span><span class="o"><?</span><span class="nx">php</span>
<span class="cm">/* Override Servers array */</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Servers'</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span>
<span class="mi">1</span> <span class="o">=></span> <span class="p">[</span>
<span class="s1">'auth_type'</span> <span class="o">=></span> <span class="s1">'cookie'</span><span class="p">,</span>
<span class="s1">'host'</span> <span class="o">=></span> <span class="s1">'mydb1'</span><span class="p">,</span>
<span class="s1">'port'</span> <span class="o">=></span> <span class="mi">3306</span><span class="p">,</span>
<span class="s1">'verbose'</span> <span class="o">=></span> <span class="s1">'Verbose name 1'</span><span class="p">,</span>
<span class="p">],</span>
<span class="mi">2</span> <span class="o">=></span> <span class="p">[</span>
<span class="s1">'auth_type'</span> <span class="o">=></span> <span class="s1">'cookie'</span><span class="p">,</span>
<span class="s1">'host'</span> <span class="o">=></span> <span class="s1">'mydb2'</span><span class="p">,</span>
<span class="s1">'port'</span> <span class="o">=></span> <span class="mi">3306</span><span class="p">,</span>
<span class="s1">'verbose'</span> <span class="o">=></span> <span class="s1">'Verbose name 2'</span><span class="p">,</span>
<span class="p">],</span>
<span class="p">];</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>See <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> for detailed description of configuration options.</p>
</div>
</div>
<div class="section" id="docker-volumes">
<h3>Docker Volumes<a class="headerlink" href="#docker-volumes" title="Permalink to this headline">¶</a></h3>
<p>You can use the following volumes to customize image behavior:</p>
<p><code class="file docutils literal notranslate"><span class="pre">/etc/phpmyadmin/config.user.inc.php</span></code></p>
<blockquote>
<div><p>Can be used for additional settings, see the previous chapter for more details.</p>
</div></blockquote>
<p><code class="file docutils literal notranslate"><span class="pre">/sessions/</span></code></p>
<blockquote>
<div><p>Directory where PHP sessions are stored. You might want to share this
for example when using <a class="reference internal" href="#auth-signon"><span class="std std-ref">Signon authentication mode</span></a>.</p>
</div></blockquote>
<p><code class="file docutils literal notranslate"><span class="pre">/www/themes/</span></code></p>
<blockquote>
<div><p>Directory where phpMyAdmin looks for themes. By default only those shipped
with phpMyAdmin are included, but you can include additional phpMyAdmin
themes (see <a class="reference internal" href="themes.html#themes"><span class="std std-ref">Custom Themes</span></a>) by using Docker volumes.</p>
</div></blockquote>
</div>
<div class="section" id="docker-examples">
<h3>Docker Examples<a class="headerlink" href="#docker-examples" title="Permalink to this headline">¶</a></h3>
<p>To connect phpMyAdmin to a given server use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d -e <span class="nv">PMA_HOST</span><span class="o">=</span>dbhost -p <span class="m">8080</span>:80 phpmyadmin:latest
</pre></div>
</div>
<p>To connect phpMyAdmin to more servers use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d -e <span class="nv">PMA_HOSTS</span><span class="o">=</span>dbhost1,dbhost2,dbhost3 -p <span class="m">8080</span>:80 phpmyadmin:latest
</pre></div>
</div>
<p>To use arbitrary server option:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -e <span class="nv">PMA_ARBITRARY</span><span class="o">=</span><span class="m">1</span> phpmyadmin:latest
</pre></div>
</div>
<p>You can also link the database container using Docker:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 phpmyadmin:latest
</pre></div>
</div>
<p>Running with additional configuration:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php phpmyadmin:latest
</pre></div>
</div>
<p>Running with additional themes:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --name phpmyadmin -d --link mysql_db_server:db -p <span class="m">8080</span>:80 -v /some/local/directory/custom/phpmyadmin/themeName/:/var/www/html/themes/themeName/ phpmyadmin:latest
</pre></div>
</div>
</div>
<div class="section" id="using-docker-compose">
<h3>Using docker-compose<a class="headerlink" href="#using-docker-compose" title="Permalink to this headline">¶</a></h3>
<p>Alternatively, you can also use docker-compose with the docker-compose.yml from
<<a class="reference external" href="https://github.com/phpmyadmin/docker">https://github.com/phpmyadmin/docker</a>>. This will run phpMyAdmin with an
arbitrary server - allowing you to specify MySQL/MariaDB server on the login page.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker-compose up -d
</pre></div>
</div>
</div>
<div class="section" id="customizing-configuration-file-using-docker-compose">
<h3>Customizing configuration file using docker-compose<a class="headerlink" href="#customizing-configuration-file-using-docker-compose" title="Permalink to this headline">¶</a></h3>
<p>You can use an external file to customize phpMyAdmin configuration and pass it
using the volumes directive:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">phpmyadmin</span><span class="p">:</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin:latest</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
<span class="nt">environment</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_ARBITRARY=1</span>
<span class="nt">restart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
<span class="nt">ports</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8080:80</span>
<span class="nt">volumes</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/sessions</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">~/docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">/custom/phpmyadmin/theme/:/www/themes/theme/</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#docker-custom"><span class="std std-ref">Customizing configuration</span></a></p>
</div>
</div>
<div class="section" id="running-behind-haproxy-in-a-subdirectory">
<h3>Running behind haproxy in a subdirectory<a class="headerlink" href="#running-behind-haproxy-in-a-subdirectory" title="Permalink to this headline">¶</a></h3>
<p>When you want to expose phpMyAdmin running in a Docker container in a
subdirectory, you need to rewrite the request path in the server proxying the
requests.</p>
<p>For example, using haproxy it can be done as:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>frontend http
bind *:80
option forwardfor
option http-server-close
### NETWORK restriction
acl LOCALNET src 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
# /phpmyadmin
acl phpmyadmin path_dir /phpmyadmin
use_backend phpmyadmin if phpmyadmin LOCALNET
backend phpmyadmin
mode http
reqirep ^(GET|POST|HEAD)\ /phpmyadmin/(.*) \1\ /\2
# phpMyAdmin container IP
server localhost 172.30.21.21:80
</pre></div>
</div>
<p>When using traefik, something like following should work:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>defaultEntryPoints = ["http"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
regex = "(http:\\/\\/[^\\/]+\\/([^\\?\\.]+)[^\\/])$"
replacement = "$1/"
[backends]
[backends.myadmin]
[backends.myadmin.servers.myadmin]
url="http://internal.address.to.pma"
[frontends]
[frontends.myadmin]
backend = "myadmin"
passHostHeader = true
[frontends.myadmin.routes.default]
rule="PathPrefixStrip:/phpmyadmin/;AddPrefix:/"
</pre></div>
</div>
<p>You then should specify <span class="target" id="index-22"></span><a class="reference internal" href="#envvar-PMA_ABSOLUTE_URI"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PMA_ABSOLUTE_URI</span></code></a> in the docker-compose
configuration:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">version</span><span class="p">:</span> <span class="s">'2'</span>
<span class="nt">services</span><span class="p">:</span>
<span class="nt">phpmyadmin</span><span class="p">:</span>
<span class="nt">restart</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">always</span>
<span class="nt">image</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin:latest</span>
<span class="nt">container_name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
<span class="nt">hostname</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phpmyadmin</span>
<span class="nt">domainname</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">example.com</span>
<span class="nt">ports</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">8000:80</span>
<span class="nt">environment</span><span class="p">:</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_HOSTS=172.26.36.7,172.26.36.8,172.26.36.9,172.26.36.10</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_VERBOSES=production-db1,production-db2,dev-db1,dev-db2</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_USER=root</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_PASSWORD=</span>
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PMA_ABSOLUTE_URI=http://example.com/phpmyadmin/</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="ibm-cloud">
<h2>IBM Cloud<a class="headerlink" href="#ibm-cloud" title="Permalink to this headline">¶</a></h2>
<p>One of our users has created a helpful guide for installing phpMyAdmin on the
<a class="reference external" href="https://github.com/KissConsult/phpmyadmin_tutorial#readme">IBM Cloud platform</a>.</p>
</div>
<div class="section" id="quick-install">
<span id="id1"></span><h2>Quick Install<a class="headerlink" href="#quick-install" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li><p>Choose an appropriate distribution kit from the phpmyadmin.net
Downloads page. Some kits contain only the English messages, others
contain all languages. We’ll assume you chose a kit whose name
looks like <code class="docutils literal notranslate"><span class="pre">phpMyAdmin-x.x.x</span> <span class="pre">-all-languages.tar.gz</span></code>.</p></li>
<li><p>Ensure you have downloaded a genuine archive, see <a class="reference internal" href="#verify"><span class="std std-ref">Verifying phpMyAdmin releases</span></a>.</p></li>
<li><p>Untar or unzip the distribution (be sure to unzip the subdirectories):
<code class="docutils literal notranslate"><span class="pre">tar</span> <span class="pre">-xzvf</span> <span class="pre">phpMyAdmin_x.x.x-all-languages.tar.gz</span></code> in your
webserver’s document root. If you don’t have direct access to your
document root, put the files in a directory on your local machine,
and, after step 4, transfer the directory on your web server using,
for example, FTP.</p></li>
<li><p>Ensure that all the scripts have the appropriate owner (if PHP is
running in safe mode, having some scripts with an owner different from
the owner of other scripts will be a problem). See <a class="reference internal" href="faq.html#faq4-2"><span class="std std-ref">4.2 What’s the preferred way of making phpMyAdmin secure against evil access?</span></a> and
<a class="reference internal" href="faq.html#faq1-26"><span class="std std-ref">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.</span></a> for suggestions.</p></li>
<li><p>Now you must configure your installation. There are two methods that
can be used. Traditionally, users have hand-edited a copy of
<code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code>, but now a wizard-style setup script is provided
for those who prefer a graphical installation. Creating a
<code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> is still a quick way to get started and needed for
some advanced features.</p></li>
</ol>
<div class="section" id="manually-creating-the-file">
<h3>Manually creating the file<a class="headerlink" href="#manually-creating-the-file" title="Permalink to this headline">¶</a></h3>
<p>To manually create the file, simply use your text editor to create the
file <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> (you can copy <code class="file docutils literal notranslate"><span class="pre">config.sample.inc.php</span></code> to get
a minimal configuration file) in the main (top-level) phpMyAdmin
directory (the one that contains <code class="file docutils literal notranslate"><span class="pre">index.php</span></code>). phpMyAdmin first
loads the default configuration values and then overrides those values
with anything found in <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code>. If the default value is
okay for a particular setting, there is no need to include it in
<code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code>. You’ll probably need only a few directives to get going; a
simple configuration may look like this:</p>
<div class="highlight-xml+php notranslate"><div class="highlight"><pre><span></span><span class="cp"><?php</span>
<span class="c1">// The string is a hexadecimal representation of a 32-bytes long string of random bytes.</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'blowfish_secret'</span><span class="p">]</span> <span class="o">=</span> <span class="nx">sodium_hex2bin</span><span class="p">(</span><span class="s1">'f16ce59f45714194371b48fe362072dc3b019da7861558cd4ad29e4d6fb13851'</span><span class="p">);</span>
<span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
<span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Servers'</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">'auth_type'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'cookie'</span><span class="p">;</span>
<span class="c1">// if you insist on "root" having no password:</span>
<span class="c1">// $cfg['Servers'][$i]['AllowNoPassword'] = true;</span>
</pre></div>
</div>
<p>Or, if you prefer to not be prompted every time you log in:</p>
<div class="highlight-xml+php notranslate"><div class="highlight"><pre><span></span><span class="cp"><?php</span>
<span class="nv">$i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span>
<span class="nv">$i</span><span class="o">++</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Servers'</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">'user'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'root'</span><span class="p">;</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Servers'</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">'password'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'changeme'</span><span class="p">;</span> <span class="c1">// use here your password</span>
<span class="nv">$cfg</span><span class="p">[</span><span class="s1">'Servers'</span><span class="p">][</span><span class="nv">$i</span><span class="p">][</span><span class="s1">'auth_type'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'config'</span><span class="p">;</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Storing passwords in the configuration is insecure as anybody can then
manipulate your database.</p>
</div>
<p>For a full explanation of possible configuration values, see the
<a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> of this document.</p>
</div>
<div class="section" id="using-the-setup-script">
<span id="setup-script"></span><span id="index-23"></span><h3>Using the Setup script<a class="headerlink" href="#using-the-setup-script" title="Permalink to this headline">¶</a></h3>
<p>Instead of manually editing <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code>, you can use phpMyAdmin’s
setup feature. The file can be generated using the setup and you can download it
for upload to the server.</p>
<p>Next, open your browser and visit the location where you installed phpMyAdmin,
with the <code class="docutils literal notranslate"><span class="pre">/setup</span></code> suffix. The changes are not saved to the server, you need to
use the <span class="guilabel">Download</span> button to save them to your computer and then upload
to the server.</p>
<p>Now the file is ready to be used. You can choose to review or edit the
file with your favorite editor, if you prefer to set some advanced
options that the setup script does not provide.</p>
<ol class="arabic simple">
<li><p>If you are using the <code class="docutils literal notranslate"><span class="pre">auth_type</span></code> “config”, it is suggested that you
protect the phpMyAdmin installation directory because using config
does not require a user to enter a password to access the phpMyAdmin
installation. Use of an alternate authentication method is
recommended, for example with HTTP–AUTH in a <a class="reference internal" href="glossary.html#term-.htaccess"><span class="xref std std-term">.htaccess</span></a> file or switch to using
<code class="docutils literal notranslate"><span class="pre">auth_type</span></code> cookie or http. See the <a class="reference internal" href="faq.html#faqmultiuser"><span class="std std-ref">ISPs, multi-user installations</span></a>
for additional information, especially <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives “Access denied” when using HTTP authentication.</span></a>.</p></li>
<li><p>Open the main phpMyAdmin directory in your browser.
phpMyAdmin should now display a welcome screen and your databases, or
a login dialog if using <a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a> or
cookie authentication mode.</p></li>
</ol>
<div class="section" id="setup-script-on-debian-ubuntu-and-derivatives">
<span id="debian-setup"></span><h4>Setup script on Debian, Ubuntu and derivatives<a class="headerlink" href="#setup-script-on-debian-ubuntu-and-derivatives" title="Permalink to this headline">¶</a></h4>
<p>Debian and Ubuntu have changed the way in which the setup script is enabled and disabled, in a way
that single command has to be executed for either of these.</p>
<p>To allow editing configuration invoke:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>/usr/sbin/pma-configure
</pre></div>
</div>
<p>To block editing configuration invoke:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>/usr/sbin/pma-secure
</pre></div>
</div>
</div>
<div class="section" id="setup-script-on-opensuse">
<h4>Setup script on openSUSE<a class="headerlink" href="#setup-script-on-opensuse" title="Permalink to this headline">¶</a></h4>
<p>Some openSUSE releases do not include setup script in the package. In case you
want to generate configuration on these you can either download original
package from <<a class="reference external" href="https://www.phpmyadmin.net/">https://www.phpmyadmin.net/</a>> or use setup script on our demo
server: <<a class="reference external" href="https://demo.phpmyadmin.net/master/setup/">https://demo.phpmyadmin.net/master/setup/</a>>.</p>
</div>
</div>
</div>
<div class="section" id="verifying-phpmyadmin-releases">
<span id="verify"></span><h2>Verifying phpMyAdmin releases<a class="headerlink" href="#verifying-phpmyadmin-releases" title="Permalink to this headline">¶</a></h2>
<p>Since July 2015 all phpMyAdmin releases are cryptographically signed by the
releasing developer, who through January 2016 was Marc Delisle. His key id is
0xFEFC65D181AF644A, his PGP fingerprint is:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">436F F188 4B1A 0C3F DCBF 0D79 FEFC 65D1 81AF 644A</span>
</pre></div>
</div>
<p>and you can get more identification information from <<a class="reference external" href="https://keybase.io/lem9">https://keybase.io/lem9</a>>.</p>
<p>Beginning in January 2016, the release manager is Isaac Bennetch. His key id is
0xCE752F178259BD92, and his PGP fingerprint is:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">3D06 A59E CE73 0EB7 1B51 1C17 CE75 2F17 8259 BD92</span>
</pre></div>
</div>
<p>and you can get more identification information from <<a class="reference external" href="https://keybase.io/ibennetch">https://keybase.io/ibennetch</a>>.</p>
<p>Some additional downloads (for example themes) might be signed by Michal Čihař. His key id is
0x9C27B31342B7511D, and his PGP fingerprint is:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">63CB 1DF1 EF12 CF2A C0EE 5A32 9C27 B313 42B7 511D</span>
</pre></div>
</div>
<p>and you can get more identification information from <<a class="reference external" href="https://keybase.io/nijel">https://keybase.io/nijel</a>>.</p>
<p>You should verify that the signature matches the archive you have downloaded.
This way you can be sure that you are using the same code that was released.
You should also verify the date of the signature to make sure that you
downloaded the latest version.</p>
<p>Each archive is accompanied by <code class="docutils literal notranslate"><span class="pre">.asc</span></code> files which contain the PGP signature
for it. Once you have both of them in the same folder, you can verify the signature:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
<span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
<span class="go">gpg: Can't check signature: public key not found</span>
</pre></div>
</div>
<p>As you can see gpg complains that it does not know the public key. At this
point, you should do one of the following steps:</p>
<ul class="simple">
<li><p>Download the keyring from <a class="reference external" href="https://files.phpmyadmin.net/phpmyadmin.keyring">our download server</a>, then import it with:</p></li>
</ul>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --import phpmyadmin.keyring
</pre></div>
</div>
<ul class="simple">
<li><p>Download and import the key from one of the key servers:</p></li>
</ul>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --keyserver hkp://pgp.mit.edu --recv-keys 3D06A59ECE730EB71B511C17CE752F178259BD92
<span class="go">gpg: requesting key 8259BD92 from hkp server pgp.mit.edu</span>
<span class="go">gpg: key 8259BD92: public key "Isaac Bennetch <[email protected]>" imported</span>
<span class="go">gpg: no ultimately trusted keys found</span>
<span class="go">gpg: Total number processed: 1</span>
<span class="go">gpg: imported: 1 (RSA: 1)</span>
</pre></div>
</div>
<p>This will improve the situation a bit - at this point, you can verify that the
signature from the given key is correct but you still can not trust the name used
in the key:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
<span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
<span class="go">gpg: Good signature from "Isaac Bennetch <[email protected]>"</span>
<span class="go">gpg: WARNING: This key is not certified with a trusted signature!</span>
<span class="go">gpg: There is no indication that the signature belongs to the owner.</span>
<span class="go">Primary key fingerprint: 3D06 A59E CE73 0EB7 1B51 1C17 CE75 2F17 8259 BD92</span>
</pre></div>
</div>
<p>The problem here is that anybody could issue the key with this name. You need to
ensure that the key is actually owned by the mentioned person. The GNU Privacy
Handbook covers this topic in the chapter <a class="reference external" href="https://www.gnupg.org/gph/en/manual.html#AEN335">Validating other keys on your public
keyring</a>. The most reliable method is to meet the developer in person and
exchange key fingerprints, however, you can also rely on the web of trust. This way
you can trust the key transitively though signatures of others, who have met
the developer in person.</p>
<p>Once the key is trusted, the warning will not occur:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
<span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
<span class="go">gpg: Good signature from "Isaac Bennetch <[email protected]>" [full]</span>
</pre></div>
</div>
<p>Should the signature be invalid (the archive has been changed), you would get a
clear error regardless of the fact that the key is trusted or not:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> gpg --verify phpMyAdmin-4.5.4.1-all-languages.zip.asc
<span class="go">gpg: Signature made Fri 29 Jan 2016 08:59:37 AM EST using RSA key ID 8259BD92</span>
<span class="go">gpg: BAD signature from "Isaac Bennetch <[email protected]>" [unknown]</span>
</pre></div>
</div>
</div>
<div class="section" id="phpmyadmin-configuration-storage">
<span id="linked-tables"></span><span id="index-24"></span><h2>phpMyAdmin configuration storage<a class="headerlink" href="#phpmyadmin-configuration-storage" title="Permalink to this headline">¶</a></h2>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 3.4.0: </span>Prior to phpMyAdmin 3.4.0 this was called Linked Tables Infrastructure, but
the name was changed due to the extended scope of the storage.</p>
</div>
<p>For a whole set of additional features (<a class="reference internal" href="bookmarks.html#bookmarks"><span class="std std-ref">Bookmarks</span></a>, comments, <a class="reference internal" href="glossary.html#term-SQL"><span class="xref std std-term">SQL</span></a>-history,
tracking mechanism, <a class="reference internal" href="glossary.html#term-PDF"><span class="xref std std-term">PDF</span></a>-generation, <a class="reference internal" href="transformations.html#transformations"><span class="std std-ref">Transformations</span></a>, <a class="reference internal" href="relations.html#relations"><span class="std std-ref">Relations</span></a>
etc.) you need to create a set of special tables. Those tables can be located
in your own database, or in a central database for a multi-user installation
(this database would then be accessed by the controluser, so no other user
should have rights to it).</p>
<div class="section" id="zero-configuration">
<span id="zeroconf"></span><h3>Zero configuration<a class="headerlink" href="#zero-configuration" title="Permalink to this headline">¶</a></h3>
<p>In many cases, this database structure can be automatically created and
configured. This is called “Zero Configuration” mode and can be particularly
useful in shared hosting situations. “Zeroconf” mode is on by default, to
disable set <span class="target" id="index-25"></span><a class="reference internal" href="config.html#cfg_ZeroConf"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['ZeroConf']</span></code></a> to false.</p>
<p>The following three scenarios are covered by the Zero Configuration mode:</p>
<ul class="simple">
<li><p>When entering a database where the configuration storage tables are not
present, phpMyAdmin offers to create them from the Operations tab.</p></li>
<li><p>When entering a database where the tables do already exist, the software
automatically detects this and begins using them. This is the most common
situation; after the tables are initially created automatically they are
continually used without disturbing the user; this is also most useful on
shared hosting where the user is not able to edit <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> and
usually the user only has access to one database.</p></li>
<li><p>When having access to multiple databases, if the user first enters the
database containing the configuration storage tables then switches to
another database,
phpMyAdmin continues to use the tables from the first database; the user is
not prompted to create more tables in the new database.</p></li>
</ul>
</div>
<div class="section" id="manual-configuration">
<h3>Manual configuration<a class="headerlink" href="#manual-configuration" title="Permalink to this headline">¶</a></h3>
<p>Please look at your <code class="docutils literal notranslate"><span class="pre">./sql/</span></code> directory, where you should find a
file called <em>create_tables.sql</em>. (If you are using a Windows server,
pay special attention to <a class="reference internal" href="faq.html#faq1-23"><span class="std std-ref">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!</span></a>).</p>
<p>If you already had this infrastructure and:</p>
<ul class="simple">
<li><p>upgraded to MySQL 4.1.2 or newer, please use
<code class="file docutils literal notranslate"><span class="pre">sql/upgrade_tables_mysql_4_1_2+.sql</span></code>.</p></li>
<li><p>upgraded to phpMyAdmin 4.3.0 or newer from 2.5.0 or newer (<= 4.2.x),
please use <code class="file docutils literal notranslate"><span class="pre">sql/upgrade_column_info_4_3_0+.sql</span></code>.</p></li>
<li><p>upgraded to phpMyAdmin 4.7.0 or newer from 4.3.0 or newer,
please use <code class="file docutils literal notranslate"><span class="pre">sql/upgrade_tables_4_7_0+.sql</span></code>.</p></li>
</ul>
<p>and then create new tables by importing <code class="file docutils literal notranslate"><span class="pre">sql/create_tables.sql</span></code>.</p>
<p>You can use your phpMyAdmin to create the tables for you. Please be
aware that you may need special (administrator) privileges to create
the database and tables, and that the script may need some tuning,
depending on the database name.</p>
<p>After having imported the <code class="file docutils literal notranslate"><span class="pre">sql/create_tables.sql</span></code> file, you
should specify the table names in your <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> file. The
directives used for that can be found in the <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a>.</p>
<p>You will also need to have a controluser
(<span class="target" id="index-26"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a> and
<span class="target" id="index-27"></span><a class="reference internal" href="config.html#cfg_Servers_controlpass"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controlpass']</span></code></a> settings)
with the proper rights to those tables. For example you can create it
using following statement:</p>
<p>And for any MariaDB version:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="k">USER</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span> <span class="k">IDENTIFIED</span> <span class="n">VIA</span> <span class="n">mysql_native_password</span> <span class="k">USING</span> <span class="s1">'pmapass'</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="n">`<pma_db>`</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span><span class="p">;</span>
</pre></div>
</div>
<p>For MySQL 8.0 and newer:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="k">USER</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span> <span class="k">IDENTIFIED</span> <span class="k">WITH</span> <span class="n">caching_sha2_password</span> <span class="k">BY</span> <span class="s1">'pmapass'</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="o"><</span><span class="n">pma_db</span><span class="o">></span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span><span class="p">;</span>
</pre></div>
</div>
<p>For MySQL older than 8.0:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="k">USER</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span> <span class="k">IDENTIFIED</span> <span class="k">WITH</span> <span class="n">mysql_native_password</span> <span class="k">AS</span> <span class="s1">'pmapass'</span><span class="p">;</span>
<span class="k">GRANT</span> <span class="k">SELECT</span><span class="p">,</span> <span class="k">INSERT</span><span class="p">,</span> <span class="k">UPDATE</span><span class="p">,</span> <span class="k">DELETE</span> <span class="k">ON</span> <span class="o"><</span><span class="n">pma_db</span><span class="o">></span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">'pma'</span><span class="nv">@'localhost'</span><span class="p">;</span>
</pre></div>
</div>
<p>Note that MySQL installations with PHP older than 7.4 and MySQL newer than 8.0 may require
using the mysql_native_password authentication as a workaround, see
<a class="reference internal" href="faq.html#faq1-45"><span class="std std-ref">1.45 I get an error message about unknown authentication method caching_sha2_password when trying to log in</span></a> for details.</p>
</div>
</div>
<div class="section" id="upgrading-from-an-older-version">
<span id="upgrading"></span><h2>Upgrading from an older version<a class="headerlink" href="#upgrading-from-an-older-version" title="Permalink to this headline">¶</a></h2>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><strong>Never</strong> extract the new version over an existing installation of
phpMyAdmin, always first remove the old files keeping just the
configuration.</p>
<p>This way, you will not leave any old or outdated files in the directory,
which can have severe security implications or can cause various breakages.</p>
</div>
<p>Simply copy <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> from your previous installation into
the newly unpacked one. Configuration files from old versions may
require some tweaking as some options have been changed or removed.
For compatibility with PHP 5.3 and later, remove a
<code class="docutils literal notranslate"><span class="pre">set_magic_quotes_runtime(0);</span></code> statement that you might find near
the end of your configuration file.</p>
<p>The complete upgrade can be performed in a few simple steps:</p>
<ol class="arabic simple">
<li><p>Download the latest phpMyAdmin version from <<a class="reference external" href="https://www.phpmyadmin.net/downloads/">https://www.phpmyadmin.net/downloads/</a>>.</p></li>
<li><p>Rename existing phpMyAdmin folder (for example to <code class="docutils literal notranslate"><span class="pre">phpmyadmin-old</span></code>).</p></li>
<li><p>Unpack freshly downloaded phpMyAdmin to the desired location (for example <code class="docutils literal notranslate"><span class="pre">phpmyadmin</span></code>).</p></li>
<li><p>Copy <code class="file docutils literal notranslate"><span class="pre">config.inc.php`</span></code> from old location (<code class="docutils literal notranslate"><span class="pre">phpmyadmin-old</span></code>) to the new one (<code class="docutils literal notranslate"><span class="pre">phpmyadmin</span></code>).</p></li>
<li><p>Test that everything works properly.</p></li>
<li><p>Remove backup of a previous version (<code class="docutils literal notranslate"><span class="pre">phpmyadmin-old</span></code>).</p></li>
</ol>
<p>If you have upgraded your MySQL server from a version previous to 4.1.2 to
version 5.x or newer and if you use the phpMyAdmin configuration storage, you
should run the <a class="reference internal" href="glossary.html#term-SQL"><span class="xref std std-term">SQL</span></a> script found in
<code class="file docutils literal notranslate"><span class="pre">sql/upgrade_tables_mysql_4_1_2+.sql</span></code>.</p>
<p>If you have upgraded your phpMyAdmin to 4.3.0 or newer from 2.5.0 or
newer (<= 4.2.x) and if you use the phpMyAdmin configuration storage, you
should run the <a class="reference internal" href="glossary.html#term-SQL"><span class="xref std std-term">SQL</span></a> script found in
<code class="file docutils literal notranslate"><span class="pre">sql/upgrade_column_info_4_3_0+.sql</span></code>.</p>
<p>Do not forget to clear the browser cache and to empty the old session by
logging out and logging in again.</p>
</div>
<div class="section" id="using-authentication-modes">
<span id="authentication-modes"></span><span id="index-28"></span><h2>Using authentication modes<a class="headerlink" href="#using-authentication-modes" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a> and cookie authentication modes are recommended in a <strong>multi-user
environment</strong> where you want to give users access to their own database and
don’t want them to play around with others. Nevertheless, be aware that MS
Internet Explorer seems to be really buggy about cookies, at least till version
6. Even in a <strong>single-user environment</strong>, you might prefer to use <a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a>
or cookie mode so that your user/password pair are not in clear in the
configuration file.</p>
<p><a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a> and cookie authentication
modes are more secure: the MySQL login information does not need to be
set in the phpMyAdmin configuration file (except possibly for the
<span class="target" id="index-29"></span><a class="reference internal" href="config.html#cfg_Servers_controluser"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['controluser']</span></code></a>).
However, keep in mind that the password travels in plain text unless
you are using the HTTPS protocol. In cookie mode, the password is
stored, encrypted with the AES algorithm, in a temporary cookie.</p>
<p>Then each of the <em>true</em> users should be granted a set of privileges
on a set of particular databases. Normally you shouldn’t give global
privileges to an ordinary user unless you understand the impact of those
privileges (for example, you are creating a superuser).
For example, to grant the user <em>real_user</em> with all privileges on
the database <em>user_base</em>:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">GRANT</span> <span class="k">ALL</span> <span class="k">PRIVILEGES</span> <span class="k">ON</span> <span class="n">user_base</span><span class="p">.</span><span class="o">*</span> <span class="k">TO</span> <span class="s1">'real_user'</span><span class="nv">@localhost</span> <span class="k">IDENTIFIED</span> <span class="k">BY</span> <span class="s1">'real_password'</span><span class="p">;</span>
</pre></div>
</div>
<p>What the user may now do is controlled entirely by the MySQL user management
system. With HTTP or cookie authentication mode, you don’t need to fill the
user/password fields inside the <span class="target" id="index-30"></span><a class="reference internal" href="config.html#cfg_Servers"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers']</span></code></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="faq.html#faq1-32"><span class="std std-ref">1.32 Can I use HTTP authentication with IIS?</span></a>,
<a class="reference internal" href="faq.html#faq1-35"><span class="std std-ref">1.35 Can I use HTTP authentication with Apache CGI?</span></a>,
<a class="reference internal" href="faq.html#faq4-1"><span class="std std-ref">4.1 I’m an ISP. Can I setup one central copy of phpMyAdmin or do I need to install it for each customer?</span></a>,
<a class="reference internal" href="faq.html#faq4-2"><span class="std std-ref">4.2 What’s the preferred way of making phpMyAdmin secure against evil access?</span></a>,
<a class="reference internal" href="faq.html#faq4-3"><span class="std std-ref">4.3 I get errors about not being able to include a file in /lang or in /libraries.</span></a></p>
</div>
<div class="section" id="http-authentication-mode">
<span id="auth-http"></span><span id="index-31"></span><h3>HTTP authentication mode<a class="headerlink" href="#http-authentication-mode" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p>Uses <a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a> Basic authentication
method and allows you to log in as any valid MySQL user.</p></li>
<li><p>Is supported with most PHP configurations. For <a class="reference internal" href="glossary.html#term-IIS"><span class="xref std std-term">IIS</span></a> (<a class="reference internal" href="glossary.html#term-ISAPI"><span class="xref std std-term">ISAPI</span></a>)
support using <a class="reference internal" href="glossary.html#term-CGI"><span class="xref std std-term">CGI</span></a> PHP see <a class="reference internal" href="faq.html#faq1-32"><span class="std std-ref">1.32 Can I use HTTP authentication with IIS?</span></a>, for using with Apache
<a class="reference internal" href="glossary.html#term-CGI"><span class="xref std std-term">CGI</span></a> see <a class="reference internal" href="faq.html#faq1-35"><span class="std std-ref">1.35 Can I use HTTP authentication with Apache CGI?</span></a>.</p></li>
<li><p>When PHP is running under Apache’s <a class="reference internal" href="glossary.html#term-mod_proxy_fcgi"><span class="xref std std-term">mod_proxy_fcgi</span></a> (e.g. with PHP-FPM),
<code class="docutils literal notranslate"><span class="pre">Authorization</span></code> headers are not passed to the underlying FCGI application,
such that your credentials will not reach the application. In this case, you can
add the following configuration directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">SetEnvIf</span> Authorization <span class="s2">"(.*)"</span> HTTP_AUTHORIZATION=$1
</pre></div>
</div>
</li>
<li><p>See also <a class="reference internal" href="faq.html#faq4-4"><span class="std std-ref">4.4 phpMyAdmin always gives “Access denied” when using HTTP authentication.</span></a> about not using the <a class="reference internal" href="glossary.html#term-.htaccess"><span class="xref std std-term">.htaccess</span></a> mechanism along with
‘<a class="reference internal" href="glossary.html#term-HTTP"><span class="xref std std-term">HTTP</span></a>’ authentication mode.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>There is no way to do proper logout in HTTP authentication, most browsers
will remember credentials until there is no different successful
authentication. Because of this, this method has a limitation that you can not
login with the same user after logout.</p>
</div>
</div>
<div class="section" id="cookie-authentication-mode">