forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocumentation.html
executable file
·4397 lines (3977 loc) · 178 KB
/
Documentation.html
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- $Id$ -->
<!--
vim: expandtab ts=4 sw=4 sts=4 tw=78
-->
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>phpMyAdmin 2.7.1-dev - Documentation</title>
<link rel="stylesheet" type="text/css" href="docs.css" />
</head>
<body>
<a name="top"></a><br />
<div class="header">
<hr noshade="noshade" width="100%" />
<a href="#top">Top</a> -
<a href="#require">Requirements</a> -
<a href="#intro">Introduction</a> -
<a href="#setup">Installation</a> -
<a href="#config">Configuration</a>
<br />
<a href="#transformations">Transformations</a> -
<a href="#faq">FAQ</a> -
<a href="#developers">Developers</a> -
<a href="#credits">Credits</a> -
<a href="translators.html">Translators</a>
<hr noshade="noshade" width="100%" />
</div>
<h1>phpMyAdmin 2.7.1-dev Documentation</h1>
<!-- TOP MENU -->
<ul>
<li>
<a href="http://www.phpmyadmin.net/">
SourceForge phpMyAdmin project page [ http://www.phpmyadmin.net/ ]
</a>
</li>
<li>
Local documents:
<ul>
<li>Version history: <a href="changelog.php">ChangeLog</a></li>
<li>General notes: <a href="readme.php">README</a></li>
<li>License: <a href="license.php">LICENSE</a></li>
</ul>
</li>
<li>
Documentation version:
<i>$Id$</i>
</li>
</ul>
<!-- REQUIREMENTS -->
<a name="require"></a><br />
<h2>Requirements</h2>
<ul>
<li>
<b>PHP</b>
<ul>
<li>You need PHP 4.1.0 or newer, with <tt>session</tt> support (<a href="#faq1_31">*</a>)</li>
<li>If you want to display inline thumbnails of JPEGs with the
original aspect ratio, you also need GD2 support in PHP</li>
<li>Starting with phpMyAdmin 2.6.1, MIME-based transformations
that use an external program need PHP 4.3.0 or newer</li>
</ul>
</li>
<li>
<b>MySQL</b> 3.23.32 or newer (<a href="#faqmysqlversions">details</a>);
</li>
<li>
Not really a requirement but a <b>strong suggestion</b>:
if you are using
the "cookie" authentication method, having the <tt>mcrypt</tt>
PHP extension on your web server accelerates not only the login
phase but every other action that you do in phpMyAdmin.
</li>
<li>
a web-browser (doh!).
</li>
</ul>
<!-- INTRODUCTION -->
<a name="intro"></a><br />
<h2>Introduction</h2>
<p>
phpMyAdmin can manage a whole MySQL server (needs a super-user) as well as
a single database. To accomplish the latter you'll need a properly set up
MySQL user who can read/write only the desired database. It's up to you to
look up the appropriate part in the MySQL manual.<br />
Currently phpMyAdmin can:
</p>
<ul>
<li>create and drop databases</li>
<li>create, copy, drop, rename and alter tables</li>
<li>do table maintenance</li>
<li>delete, edit and add fields</li>
<li>execute any SQL-statement, even batch-queries</li>
<li>manage keys on fields</li>
<li>load text files into tables</li>
<li>create (*) and read dumps of tables</li>
<li>export (*) data to CSV, XML and Latex formats</li>
<li>administer multiple servers</li>
<li>manage MySQL users and privileges</li>
<li>check referential integrity in MyISAM tables</li>
<li>using Query-by-example (QBE), create complex queries automatically connecting required tables</li>
<li>create PDF graphics of your Database layout</li>
<li>search globally in a database or a subset of it</li>
<li>transform stored data into any format using a set of predefined functions,
like displaying BLOB-data as image or download-link or ...</li>
<li>support InnoDB tables and foreign keys <a href="#faq3_6">(see FAQ 3.6)</a></li>
<li>support mysqli, the improved MySQL extension <a href="#faqmysqlversions">(see FAQ 1.17)</a></li>
<li>
communicate in
<a href="./translators.html">50 different languages</a>
</li>
</ul>
<p class="footnote">
(*)
phpMyAdmin can compress (Zip, GZip -RFC 1952- or Bzip2 formats) dumps
and CSV exports if you use PHP4 >= 4.0.4 with Zlib support
(<tt>--with-zlib</tt>) and/or Bzip2 support (<tt>--with-bz2</tt>).
</p>
<!-- INSTALLATION -->
<a name="setup"></a><br />
<h2>Installation</h2>
<p>
<span class="important">NOTE: 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. </span>phpMyAdmin's
"Privileges" page can be used for this.
</p>
<p>
<span class="important">Warning for Mac users:</span>if you are on a MacOS
version before OS X, StuffIt unstuffs with Mac formats.<br />
So you'll have to resave as in BBEdit to Unix style ALL phpMyAdmin scripts
before uploading them to your server, as PHP seems not to like Mac-style
end of lines character ("<tt>\r</tt>").
</p>
<h3>Quick Install</h3>
<ol>
<li> Untar or unzip the distribution (be sure to unzip the subdirectories):
<tt>tar -xzvf phpMyAdmin_x.x.x.tar.gz</tt> 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 3,
transfer the directory on your web server using, for example, ftp.</li>
<li> 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 href="#faq4_2">FAQ 4.2</a> for suggestions.</li>
<li> Create the file <tt>config.inc.php</tt> in your favorite editor and
fill in there values for host, user, password and authentication mode
to fit your environment. Look at <tt>config.default.php</tt> how
these fields should be defined. Here, "host" means the
MySQL server. Have a look at
<a href="#config">Configuration section</a> for an
explanation of all values. Please also read the remaining of this
Installation section for information about authentication modes
and the linked-tables infrastructure.</li>
<li> If you are using the config auth_type, it is suggested that you protect the
phpMyAdmin installation directory, for example with HTTP–AUTH in a
<i>.htaccess</i> file. See the <a href="#faqmultiuser">
multi–user sub–section</a> of this FAQ for additional
information, especially <a href="$faq4_4">FAQ 4.4</a>.</li>
<li> Open the file
<i><www.your-host.com>/<your-install-dir>/index.php</i>
in your browser. phpMyAdmin should now display a welcome screen
and your databases, or a login dialog if using HTTP or cookie
authentication mode.</li>
</ol>
<a name="linked-tables"></a>
<h3>Linked-tables infrastructure</h3>
<p>
For a whole set of new features (bookmarks, comments, SQL-history,
PDF-generation, field contents transformation, 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).
<br /> <br />
Please look at your scripts/
directory, where you should find a file called <i>create_tables.sql</i>.
(If you are using a Windows server, pay special attention to <a href="#faq1_23">FAQ 1.23</a>).
<br /> <br />
If your MySQL server's version is 4.1.2 or later, please use
<i>create_tables_mysql_4_1_2+.sql</i> instead, for a new installation.
<br /> <br />
If you already had this infrastructure and upgraded to MySQL 4.1.2
or later, please use <i>upgrade_tables_mysql_4_1_2+.sql</i>.
<br /> <br />
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.
<br /> <br />
After having imported the <i>create_tables.sql</i> file,
you should specify the table names in your <i>config.inc.php</i> file. The directives
used for that can be found in the <a href="#config">Configuration section</a>.
You will also need to have a controluser with the proper rights to
those tables (see section <i>Using authentication modes</i> below).
</p>
<h3>Upgrading from an older version</h3>
<p>
Just copy <i>config.inc.php</i> from previous installation into a
newly unpacked one. If your previous phpMyAdmin version was 2.3.0 or
older, some tweaking may be required because, as of 2.7.0, using those
old config files is no longer supported.
</p>
<h3>Using authentication modes</h3>
<ul>
<li>HTTP and cookie authentication modes are recommended in a <b>multi-user
environment</b> where you want to give users access to their own
database and don't want them to play around with others.
<br />
Nevertheless be aware that MS Internet Explorer seems to be really
buggy about cookies, at least till version 6. And PHP 4.1.1 is also a
bit buggy in this area!<br />
Even in a <b>single-user environment</b>, you might prefer to use
HTTP or cookie mode so that your user/password pair are not in clear
in the configuration file.<br /><br /></li>
<li>HTTP 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 <a href="#controluser">controluser</a>).
<br />
However, keep in mind that the password travels in plain text, unless
you are using the HTTPS protocol.
<br />
In cookie mode, the password is stored, encrypted with the blowfish
algorithm, in a temporary cookie.
<br /><br /></li>
<li>
<b>Note: starting with phpMyAdmin 2.6.1, configuring the controluser
to enable HTTP and cookie authentication applies <i>only
to MySQL servers older than 4.1.2</i>.</b> See the <a href="#controluser">controluser</a> directive.
<br /><br />
For 'HTTP' and 'cookie' modes, phpMyAdmin needs a controluser that has
<b>only</b> the <tt>SELECT</tt> privilege on the <i>mysql.user (all
columns except "Password")</i>, <i>mysql.db (all
columns)</i>, <i>mysql.host (all columns)</i> and
<i>mysql.tables_priv (all columns except
"Grantor" & "Timestamp") </i>tables.<br /> You
must specify the details for the <a href="#controluser">controluser</a>
in the <i>config.inc.php</i> file under the
<tt>$cfg['Servers'][$i]['controluser']</tt>&
<tt>$cfg['Servers'][$i]['controlpass']</tt> settings.<br /> The
following example assumes you want to use <tt>pma</tt> as the
controluser and <tt>pmapass</tt> as the controlpass, but <b>this is
only an example: use something else in your file!</b><br /> Of course
you have to replace <tt>localhost</tt> by the webserver's host if it's
not the same as the MySQL server's one.
<pre>
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
GRANT SELECT (
Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
Execute_priv, Repl_slave_priv, Repl_client_priv
) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';
</pre>
If you are using an old MySQL version (below 4.0.2), please replace
the first GRANT SELECT query by this one:
<pre>
GRANT SELECT (
Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
File_priv, Grant_priv, References_priv, Index_priv, Alter_priv
) ON mysql.user TO 'pma'@'localhost';
</pre>
... and if you want to use the many new relation and bookmark
features:
<pre>
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
</pre>
(this of course requires that your <a href="#linked-tables">linked-tables infrastructure</a> be set up).
<br />
Of course, the above queries only work if your MySQL version supports
the GRANT command. This is the case since 3.22.11.
</li>
<li>
Then each of the <i>true</i> 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).<br />
For example, to grant the user <i>real_user</i> with
all privileges on the database <i>user_base</i>:<br />
<tt>GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password';</tt>
<br />
What the user may now do is controlled entirely by the MySQL user
management system.<br />
With HTTP or cookie authentication mode, you don't need to fill the
user/password fields inside the <tt>$cfg['Servers']</tt> array.<br />
</li>
</ul>
<h4>'http' authentication mode</h4>
<ul>
<li>Was called 'advanced' in versions before 2.2.3.</li>
<li>Introduced in 1.3.0, it uses Basic HTTP authentication method and
allows you to login as any valid MySQL user.</li>
<li>Is supported with PHP running as an Apache module. For IIS (ISAPI)
support using CGI PHP, see <a href="#faq1_32">FAQ 1.32</a>.</li>
<li>See also <a href="#faq4_4">FAQ 4.4</a> about not using the <i>.htaccess</i> mechanism along
with 'http' authentication mode.</li>
</ul>
<h4>'cookie' authentication mode</h4>
<ul>
<li>You can use this method as a replacement for the HTTP
authentication (for example, if you're running IIS).
</li>
<li>Obviously, the user must enable cookies in the browser.</li>
<li>With this mode, the user can truly logout of phpMyAdmin and login back
with the same username.</li>
<li>If you want to login to arbitrary server see
<tt><a href="#AllowArbitraryServer">$cfg['AllowArbitraryServer']</a></tt> directive.</li>
<li>As mentioned in the <a href="#require">requirements</a> section, having the
<tt>mcrypt</tt> extension will speed up access considerably, but is not required.</li>
</ul>
<h4>'config' authentication mode</h4>
<ul>
<li>This mode is the less secure one because it requires you to fill the
<tt><a href="#servers_user">$cfg['Servers'][$i]['user']</a></tt> and
<tt><a href="#servers_user">$cfg['Servers'][$i]['password']</a></tt> fields
(and as a result, anyone who can read your config.inc.php can discover your
username and password).<br />
But you don't need to setup a "controluser" here:
using the <tt><a href="#servers_only_db">$cfg['Servers'][$i]['only_db']</a></tt> might be enough.</li>
<li>In the <a href="#faqmultiuser">ISP FAQ</a> section, there is an entry explaining how to protect
your configuration file.<br /></li>
<li>For additional security in this mode, you may wish to consider the
Host authentication <tt><a href="#servers_allowdeny_order">$cfg['Servers'][$i]['AllowDeny']['order']</a></tt>
and <tt><a href="#servers_allowdeny_rules">$cfg['Servers'][$i]['AllowDeny']['rules']</a></tt> configuration
directives.</li>
</ul>
<!-- CONFIGURATION -->
<a name="config"></a><br />
<h2>Configuration</h2>
<p>
<span class="important">Warning for Mac users:</span> PHP does not seem to like
Mac end of lines character ("<tt>\r</tt>"). So ensure you choose
the option that allows to use the *nix end of line character
("<tt>\n</tt>") in your text editor before saving a script
you have modified.
</p>
<p>
<span class="important">Configuration note:</span>
Almost all configurable data is placed in <tt>config.inc.php</tt>. If this file
does not exist, please refer to the <a href="#setup">Quick install</a>
section to create one. This file only needs to contain the parameters you want to
change from their corresponding default value in <tt>config.default.php</tt>.
<br /><br />
The parameters which relate to design (like colors)
are placed in <tt>themes/themename/layout.inc.php</tt>. You
might also want to modify <i>config.footer.inc.php</i> and
<i>config.header.inc.php</i> files to add your site specific code to be
included on start and end of each page.
</p>
<dl>
<dt><b>$cfg['PmaAbsoluteUri']</b> string</dt>
<dd>
Sets here the complete URL (with full path) to your phpMyAdmin
installation's directory.
E.g. <tt>http://www.your_web.net/path_to_your_phpMyAdmin_directory/</tt>.
Note also that the URL on some web servers are case–sensitive.
Don’t forget the trailing slash at the end.
<br /><br />
Starting with version 2.3.0, it is advisable to try leaving this
blank. In most cases phpMyAdmin automatically detects the proper
setting. Users of port forwarding will need to set PmaAbsoluteUri (<a
href="https://sourceforge.net/tracker/index.php?func=detail&aid=1340187&group_id=23067&atid=377409">more info</a>).
A good test is to browse a table, edit a row and save it. There should
be an error message if phpMyAdmin is having trouble auto–detecting the correct value. If you get an error that this must be set or if
the autodetect code fails to detect your path, please post a bug
report on our bug tracker so we can improve the code.
</dd>
<dt><b>$cfg['PmaNoRelation_DisableWarning']</b> boolean</dt>
<dd>
Starting with version 2.3.0 phpMyAdmin offers a lot of features to work
with master / foreign - tables (see
<a href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>).
<br />
If you tried to set this up and it does not work for you, have a look on
the "Structure" page of one database where you would like to
use it. You will find a link that will analyze why those features have
been disabled.<br />
If you do not want to use those features set this variable to
<tt>TRUE</tt> to stop this message from appearing.
</dd>
<dt><b>$cfg['blowfish_secret']</b> string</dt>
<dd>
Starting with version 2.5.2, the 'cookie' auth_type uses blowfish
algorithm to encrypt the password.
<br />
If you are using the 'cookie' auth_type, enter here a random
passphrase of your choice. It will be used internally by the blowfish
algorithm: you won't be prompted for this passphrase. The maximum
number of characters for this parameter seems to be 46.
</dd>
<dt><b>$cfg['Servers']</b> array</dt>
<dd>
Since version 1.4.2, phpMyAdmin supports the administration of multiple
MySQL servers.
Therefore, a $cfg['Servers']-array has been added which contains
the login information for the different servers. The first
<tt>$cfg['Servers'][$i]['host']</tt> contains the hostname of the first
server, the second <tt>$cfg['Servers'][$i]['host']</tt> the hostname of
the second server, etc.
In <tt>config.default.php</tt>, there is only one section for server
definition, however you can put as many as you need in
<tt>config.inc.php</tt>, copy that block or needed parts (you don't
have to define all settings, just those you need to change).
</dd>
<dt><b>$cfg['Servers'][$i]['host']</b> string</dt>
<dd>
The hostname or IP address of your $i-th MySQL-server. E.g. localhost.
</dd>
<dt><b>$cfg['Servers'][$i]['port']</b> string</dt>
<dd>
The port-number of your $i-th MySQL-server. Default is 3306 (leave
blank). If you use "localhost" as the hostname, MySQL
ignores this port number and connects with the socket, so if you want
to connect to a port different from the default port, use
"127.0.0.1" or the real hostname in
$cfg['Servers'][$i]['host'].
</dd>
<dt><b>$cfg['Servers'][$i]['socket']</b> string</dt>
<dd>
The path to the socket to use. Leave blank for default.
</dd>
<dt><b>$cfg['Servers'][$i]['connect_type']</b> string</dt>
<dd>
What type connection to use with the MySQL server. Your options are
<tt>'socket'</tt> & <tt>'tcp'</tt>. It defaults to 'tcp' as that
is nearly guaranteed to be available on all MySQL servers, while
sockets are not supported on some platforms.
<br /><br />
To use the socket mode, your MySQL server must be on the same machine
as the Web server.
</dd>
<dt><b>$cfg['Servers'][$i]['extension']</b> string</dt>
<dd>
What php MySQL extension to use for the connection. Valid options are:
<br /><br />
<tt><i>mysql</i></tt> :
The classic MySQL extension. This is the recommended and default
method at this time.
<br /><br />
<tt><i>mysqli</i></tt> :
The improved MySQL extension. This extension became available
with php 5.0.0 and is the recommended way to connect to a server
running MySQL 4.1.x.
<br />
Note: phpMyAdmin's MySQL 4.1 support is experimental!
</dd>
<dt><b>$cfg['Servers'][$i]['compress']</b> boolean</dt>
<dd>
Whether to use a compressed protocol for the MySQL server connection
or not (experimental).<br />
This feature requires PHP >= 4.3.0.
</dd>
<dt>
<a name="controluser"></a><br />
<b>$cfg['Servers'][$i]['controluser']</b> string<br />
<b>$cfg['Servers'][$i]['controlpass']</b> string
</dt>
<dd>
<i>Note: starting with phpMyAdmin 2.6.1, configuring the controluser
to enable HTTP and cookie authentication applies only
to MySQL servers older than 4.1.2.</i>
<br /><br />
This special account is used for 2 distinct purposes: to make possible
all relational features
(see <a href="#pmadb">$cfg['Servers'][$i]['pmadb']</a>) and, for a
MySQL server older than 4.1.2, to enable a multi-user installation
(http or cookie authentication mode).
<br /><br />
When using HTTP or cookie authentication modes (or 'config'
authentication mode since phpMyAdmin 2.2.1), you need to supply the
details of a MySQL account that has <tt>SELECT</tt> privilege on the
<i>mysql.user (all columns except "Password")</i>,
<i>mysql.db (all columns)</i> & <i>mysql.tables_priv (all columns
except "Grantor" & "Timestamp") </i>tables.
This account is used to check what databases the user will see at
login.
<br />
Please see the <a href="#setup">install section</a> on
"Using authentication modes" for more information.
<br /><br />
Note that if you try login to phpMyAdmin with this
"controluser", you could get some errors, depending the exact
privileges you gave to the "controluser". phpMyAdmin does not
support a direct login with the "controluser".
<br /><br />
In phpMyAdmin versions before 2.2.5, those were called
"stduser/stdpass".
</dd>
<dt><b>$cfg['Servers'][$i]['auth_type']</b> string
<tt>['http'|'cookie'|'config']</tt></dt>
<dd>
Whether config or cookie or http authentication should be used for this
server.
<ul>
<li>
'config' authentication
(<tt>$auth_type = 'config'</tt>) is the plain old
way: username and password are stored in
<i>config.inc.php</i>.
</li>
<li>
'cookie' authentication mode
(<tt>$auth_type = 'cookie'</tt>) as introduced in
2.2.3 allows you to log in as any valid MySQL user with the
help of cookies. Username and password are stored in
cookies during the session and password is deleted when it
ends. This can also allow you to login in arbitrary server if
<tt><a href="#AllowArbitraryServer">$cfg['AllowArbitraryServer']</a></tt> enabled.
</li>
<li>
'http' authentication (was called 'advanced' in older versions)
(<tt>$auth_type = 'http'</tt>) as introduced in 1.3.0
allows you to log in as any valid MySQL user via HTTP-Auth.
</li>
</ul><br />
Please see the <a href="#setup">install section</a> on "Using authentication modes"
for more information.
</dd>
<dt>
<a name="servers_user"></a><br />
<b>$cfg['Servers'][$i]['user']</b> string<br />
<b>$cfg['Servers'][$i]['password']</b> string
</dt>
<dd>
When using auth_type = 'config', this is the user/password-pair
which phpMyAdmin will use to connect to the
MySQL server. This user/password pair is not needed when HTTP or
cookie authentication is used and should be empty.
</dd>
<dt>
<a name="servers_only_db"></a><br />
<b>$cfg['Servers'][$i]['only_db']</b> string or array
</dt>
<dd>
If set to a (an array of) database name(s), only this (these) database(s)
will be shown to the user. Since phpMyAdmin 2.2.1, this/these
database(s) name(s) may contain MySQL wildcards characters
("_" and "%"): if you want to use literal instances
of these characters, escape them (I.E. use <tt>'my\_db'</tt> and not
<tt>'my_db'</tt>).<br />
This setting is an efficient way to lower the server load since the
latter does not need to send MySQL requests to build the available
database list. But <span class="important">it does not replace the
privileges rules of the MySQL database server</span>. If set, it just
means only these databases will be displayed but
<span class="important">not that all other databases can't be used.</span>
<br /><br />
An example of using more that one database:
<tt>$cfg['Servers'][$i]['only_db'] = array('db1', 'db2'); </tt>
<br /><br />
As of phpMyAdmin 2.5.5 the order inside the array is used for sorting the
databases in the left frame, so that you can individually arrange your databases.<br />
If you want to have certain databases at the top, but don't care about the others, you do not
need to specify all other databases. Use:
<tt>$cfg['Servers'][$i]['only_db'] = array('db3', 'db4', '*');</tt>
instead to tell phpMyAdmin that it should display db3 and db4 on top, and the rest in alphabetic
order.
</dd>
<dt><b>$cfg['Servers'][$i]['verbose']</b> string</dt>
<dd>
Only useful when using phpMyAdmin with multiple server entries. If set,
this string will be displayed instead of the hostname in the pull-down
menu on the main page. This can be useful if you want to show only
certain databases on your system, for example.
</dd>
<dt>
<a name="pmadb"></a><br />
<b>$cfg['Servers'][$i]['pmadb']</b> string
</dt>
<dd>
The name of the database containing the linked-tables infrastructure.
<br /><br />
See the <a href="#linked-tables">Linked-tables infrastructure</a>
section in this document to see the benefits of this infrastructure,
and for a quick way of creating this database and the needed tables.
<br /><br />
If you are the only user of this phpMyAdmin installation, you can
use your current database to store those special tables; in this
case, just put your current database name in
<tt>$cfg['Servers'][$i]['pmadb']</tt>. For a multi-user installation,
set this parameter to the name of your central database containing
the linked-tables infrastructure.
</dd>
<dt>
<a name="bookmark"></a><br />
<b>$cfg['Servers'][$i]['bookmarktable']</b> string
</dt>
<dd>
Since release 2.2.0 phpMyAdmin allows to bookmark queries. This can be
useful for queries you often run.<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>enter the table name in
<tt>$cfg['Servers'][$i]['bookmarktable']</tt></li>
</ul><br />
</dd>
<dt>
<a name="relation"></a><br />
<b>$cfg['Servers'][$i]['relation']</b> string
</dt>
<dd>
Since release 2.2.4 you can describe, in a special 'relation' table,
which field is a key in another table (a foreign key). phpMyAdmin
currently uses this to
<ul>
<li>
make clickable, when you browse the master table, the data values
that point to the foreign table;
</li>
<li>
display in an optional tool-tip the "display field"
when browsing the master table, if you move the mouse to a column
containing a foreign key (use also the 'table_info' table);<br />
(see <a href="#faqdisplay">FAQ 6.7</a>)
</li>
<li>
in edit/insert mode, display a drop-down list of possible
foreign keys (key value and "display field" are
shown)<br />
(see <a href="#faq6_21">FAQ 6.21</a>)
</li>
<li>
display links on the table properties page, to check referential
integrity (display missing foreign keys) for each described key;
</li>
<li>
in query-by-example, create automatic joins (see <a href="#faq6_6">FAQ 6.6</a>)
</li>
<li>
enable you to get a PDF schema of your database (also uses the
table_coords table).
</li>
</ul>
<br />
The keys can be numeric or character.
<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>
put the relation table name in
<tt>$cfg['Servers'][$i]['relation']</tt>
</li>
<li>
now as normal user open phpMyAdmin and for each one of your
tables where you want to use this feature, click
"Structure/Relation view/" and choose foreign fields.
</li>
</ul><br />
Please note that in the current version, <tt>master_db</tt>
must be the same as <tt>foreign_db</tt>. Those fields have been put in
future development of the cross-db relations.
</dd>
<dt>
<a name="table_info"></a><br />
<b>$cfg['Servers'][$i]['table_info']</b> string
</dt>
<dd>
Since release 2.3.0 you can describe, in a special 'table_info'
table, which field is to be displayed as a tool-tip when moving the
cursor over the corresponding key.
<br />
This configuration variable will hold the name of this special
table.
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>
put the table name in
<tt>$cfg['Servers'][$i]['table_info']</tt>
</li>
<li>
then for each table where you want to use this feature,
click "Structure/Relation view/Choose field to display"
to choose the field.
</li>
</ul><br />
Usage tip: <a href="#faqdisplay">Display field</a>.
</dd>
<dt>
<a name="table_coords"></a><br />
<b>$cfg['Servers'][$i]['table_coords']</b> string<br />
<b>$cfg['Servers'][$i]['pdf_pages']</b> string
</dt>
<dd>
Since release 2.3.0 you can have phpMyAdmin create PDF pages showing
the relations between your tables. To do this it needs two tables
"pdf_pages" (storing information about the available PDF
pages) and "table_coords" (storing coordinates where each
table will be placed on a PDF schema output).
<br /><br />
You must be using the "relation" feature.
<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>
put the correct table names in
<tt>$cfg['Servers'][$i]['table_coords']</tt> and
<tt>$cfg['Servers'][$i]['pdf_pages']</tt>
</li>
</ul><br />
Usage tips: <a href="#faqpdf">PDF output</a>.
</dd>
<dt>
<a name="col_com"></a><br />
<b>$cfg['Servers'][$i]['column_info']</b> string
</dt>
<dd>
<!-- This part requires a content update! -->
Since release 2.3.0 you can store comments to describe each column
for each table. These will then be shown on the "printview".
<br /><br />
Starting with release 2.5.0, comments are consequently used on the table property
pages and table browse view, showing up as tool-tips above the column name (properties page)
or embedded within the header of table in browse view. They can also be shown
in a table dump. Please see the relevant configuration directives later on.
<br /><br />
Also new in release 2.5.0 is a MIME-transformation system which is also based on
the following table structure. See <a href="#transformations">Transformations</a>
for further information. To use the MIME-transformation system, your column_info
table has to have the three new fields 'mimetype', 'transformation', 'transformation_options'.
<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>
put the table name in
<tt>$cfg['Servers'][$i]['column_info']</tt>
</li>
<li>
to update your PRE-2.5.0 Column_comments Table use this:<br />
<tt>
ALTER TABLE `pma_column_comments` <br />
ADD `mimetype` VARCHAR( 255 ) NOT NULL ,<br />
ADD `transformation` VARCHAR( 255 ) NOT NULL ,<br />
ADD `transformation_options` VARCHAR( 255 ) NOT NULL ;<br />
</tt>
and remember that the Variable in <i>config.inc.php</i> has been renamed
from <br /><tt>$cfg['Servers'][$i]['column_comments']</tt> to <tt>$cfg['Servers'][$i]['column_info']</tt>
</li>
</ul>
</dd>
<dt>
<a name="history"></a><br />
<b>$cfg['Servers'][$i]['history']</b> string
</dt>
<dd>
Since release 2.5.0 you can store your SQL history, which means all queries you
entered manually into the phpMyAdmin interface. If you don't want to use a table-
based history, you can use the JavaScript-based history. Using that, all your
history items are deleted when closing the window.<br /><br />
Using <b>$cfg['QueryHistoryMax']</b> you can specify an amount of history items
you want to have on hold. On every login, this list gets cut to the maximum amount.
<br /><br />
The query history is only available if JavaScript is enabled in your
browser.
<br /><br />
To allow the usage of this functionality:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
<li>
put the table name in
<tt>$cfg['Servers'][$i]['history']</tt>
</li>
</ul>
</dd>
<dt>
<b>$cfg['Servers'][$i]['verbose_check']</b> boolean
</dt>
<dd>
Because release 2.5.0 introduced the new MIME-transformation support, the
column_info table got enhanced with three new fields. If the above variable is
set to <tt>TRUE</tt> (default) phpMyAdmin will check if you have the latest table structure
available. If not, it will emit a warning to the superuser.<br /><br />
You can disable this checking behavior by setting the variable to false, which
should offer a performance increase.<br /><br />
Recommended to set to FALSE, when you are sure, your table structure is up to date.
</dd>
<dt>
<b>$cfg['Servers'][$i]['AllowRoot']</b> boolean
</dt>
<dd>
Whether to allow root access, This is just simplification of rules below.
</dd>
<dt>
<a name="servers_allowdeny_order"></a><br />
<b>$cfg['Servers'][$i]['AllowDeny']['order']</b> string
</dt>
<dd>
If your rule order is empty, then IP authentication is disabled.
<br /><br />
If your rule order is set to <tt>'deny,allow'</tt> then the system
applies all deny rules followed by allow rules.
Access is allowed by default. Any client which does not match a Deny
command or does match an Allow command will be allowed access to the
server.
<br /><br />
If your rule order is set to <tt>'allow,deny'</tt> then the system
applies all allow rules followed by deny rules. Access is denied by
default. Any client which does not match an Allow directive or does
match a Deny directive will be denied access to the server.
<br /><br />
If your rule order is set to 'explicit', the authentication is
performed in a similar fashion to rule order 'deny,allow', with the
added restriction that your host/username combination <b>must</b> be
listed in the <i>allow</i> rules, and not listed in the <i>deny</i>
rules. This is the <b>most</b> secure means of using Allow/Deny rules,
and was available in Apache by specifying allow and deny rules without
setting any order.
</dd>
<dt>
<a name="servers_allowdeny_rules"></a><br />
<b>$cfg['Servers'][$i]['AllowDeny']['rules']</b> array of strings
</dt>
<dd>
The general format for the rules is as such:<br />
<tt>
<'allow' | 'deny'> <username> [from] <ipmask>
</tt>
<br /><br />
If you wish to match all users, it is possible to use a <tt>'%'</tt> as
a wildcard in the <i>username</i> field.<br />
There are a few shortcuts you can use in the <i>ipmask</i> field as
well (please note that those containing SERVER_ADDRESS might not be
available on all webservers):<br /><br />
<tt>
'all' -> 0.0.0.0/0<br />
'localhost' -> 127.0.0.1/8<br />
'localnetA' -> SERVER_ADDRESS/8<br />
'localnetB' -> SERVER_ADDRESS/16<br />
'localnetC' -> SERVER_ADDRESS/24
</tt>
<br /><br />
Having an empty rule list is equivalent to either using
<tt>'allow % from all'</tt> if your rule order is set to
<tt>'deny,allow'</tt> or <tt>'deny % from all'</tt> if your rule order
is set to <tt>'allow,deny'</tt> or <tt>'explicit'</tt>.
<br /><br />
For the IP matching system, the following work:<br />
<tt>xxx.xxx.xxx.xxx</tt> (an exact IP address)<br />
<tt>xxx.xxx.xxx.[yyy-zzz]</tt> (an IP address range)<br />
<tt>xxx.xxx.xxx.xxx/nn</tt> (CIDR, Classless Inter-Domain Routing type IP addresses)<br />
But the following does not work:<br />
<tt>xxx.xxx.xxx.xx[yyy-zzz]</tt> (partial IP address range)
</dd>
<dt><b>$cfg['ServerDefault']</b> integer</dt>
<dd>
If you have more than one server configured, you can set
<tt>$cfg['ServerDefault']</tt> to any one of them to autoconnect to
that server when phpMyAdmin is started, or set it to 0 to be given a
list of servers without logging in.<br />
If you have only one server configured, <tt>$cfg['ServerDefault']</tt>
MUST be set to that server.
</dd>
<dt><b>$cfg['OBGzip'] </b>string/boolean</dt>
<dd>
Defines whether to use GZip output buffering for increased
speed in HTTP transfers.<br />
Set to true/false for enabling/disabling. When set to 'auto' (string),
phpMyAdmin tries to enable output buffering and will automatically disable
it, if your browser has some problems with buffering. IE6 with a certain patch
is known to cause data corruption having enabled buffering.
</dd>
<dt><b>$cfg['PersistentConnections'] </b>boolean</dt>
<dd>
Whether persistent connections should be used or not (mysql_connect or
mysql_pconnect).
</dd>
<dt><b>$cfg['ForceSSL'] </b>boolean</dt>
<dd>
Whether to force using https while accessing phpMyAdmin.
</dd>
<dt><b>$cfg['ExecTimeLimit'] </b>integer [number of seconds]</dt>
<dd>
Set the number of seconds a script is allowed to run. If seconds is set
to zero, no time limit is imposed.<br />
This setting is used while importing/exporting dump files but has no
effect when PHP is running in safe mode.
</dd>
<dt><b>$cfg['SkipLockedTables'] </b>boolean</dt>
<dd>
Mark used tables and make it possible to show databases with locked
tables (since 3.23.30).
</dd>
<dt><b>$cfg['ShowSQL'] </b>boolean</dt>
<dd>
Defines whether SQL-queries generated by phpMyAdmin should be displayed
or not.
</dd>
<dt><b>$cfg['AllowUserDropDatabase'] </b>boolean</dt>
<dd>
Defines whether normal users (non-administrator) are allowed to
delete their own database or not. If set as FALSE, the link "Drop
Database" will not be shown, and even a "DROP DATABASE
mydatabase" will be rejected. Quite practical for ISP's with many
customers.
</dd>
<dt><b>$cfg['Confirm'] </b>boolean</dt>
<dd>
Whether a warning ("Are your really sure...") should be
displayed when you're about to lose data.
</dd>
<dt><b>$cfg['LoginCookieRecall'] </b>boolean</dt>
<dd>
Define whether the previous login should be recalled or not in cookie
authentication mode.
</dd>
<dt><b>$cfg['UseDbSearch'] </b>boolean</dt>
<dd>
Define whether the "search string inside database" is enabled or not.
</dd>
<dt><b>$cfg['IgnoreMultiSubmitErrors'] </b>boolean</dt>