2 phpMyAdmin 2.3.1-rc1 Documentation
4 * Sourceforge phpMyAdmin project page [ http://www.phpmyadmin.net/
7 + Version history: ChangeLog
8 + General notes: README
10 * Documentation version: $Id: Documentation.html,v 1.342 2002/09/15
12 ______________________________________________________________________
14 Top - Requirements - Introduction - Installation -
15 Configuration - FAQ - Developers - Credits
16 ______________________________________________________________________
20 * PHP3 or PHP4: phpMyAdmin widely uses the 'str_replace()' php
21 function that was added in PHP 3.0.6, but was buggy up until
22 PHP 3.0.8. Then you should not run this script with PHP3 < 3.0.8.
23 PHP also needs to be compiled with MySQL support;
24 * MySQL (tested with 3.21.x, 3.22.x, 3.23.x and 4.0.x);
25 * a web-browser (doh!).
26 ______________________________________________________________________
28 Top - Requirements - Introduction - Installation -
29 Configuration - FAQ - Developers - Credits
30 ______________________________________________________________________
34 phpMyAdmin can manage a whole MySQL-server (needs a super-user) but
35 also a single database. To accomplish the latter you'll need a
36 properly set up MySQL-user who can read/write only the desired
37 database. It's up to you to look up the appropriate part in the MySQL
38 manual. Currently phpMyAdmin can:
39 * create and drop databases
40 * create, copy, drop and alter tables
41 * delete, edit and add fields
42 * execute any SQL-statement, even batch-queries
43 * manage keys on fields
44 * load text files into tables
45 * create (*) and read dumps of tables
46 * export (*) and import data to CSV values
47 * administer multiple servers and single databases
48 * check referential integrity
49 * create complex queries automatically connecting required tables
50 * create PDF graphics of your Database layout
51 * communicate in more than 41 different languages
53 (*) phpMyAdmin can compress (Zip, GZip -RFC 1952- or Bzip2 formats)
54 dumps and CSV exports if you use PHP4 >= 4.0.4 with Zlib support
55 (--with-zlib) and/or Bzip2 support (--with-bz2).
56 ______________________________________________________________________
58 Top - Requirements - Introduction - Installation -
59 Configuration - FAQ - Developers - Credits
60 ______________________________________________________________________
64 NOTE: phpMyAdmin does not apply any special security methods to the
65 MySQL database server. It is still the sysadmin's job to grant
66 permissions on the MySQL databases properly. phpMyAdmin's "Users" page
69 Warning for Mac users:if you are on a MacOS version before OS X,
70 Stuffit unstuffs with Mac formats.
71 So you'll have to resave as in Bbedit to unix style ALL phpMyAdmin
72 scripts before uploading them to your server, as PHP seems not to like
73 Mac-style end of lines character ("\r").
75 Documentation warning: when you see in this document a .php3 file
76 extension, please transpose to .php if you are using a kit with files
77 having this extension.
80 1. Choose and download a distribution kit with the files having the
81 extension (.php3 or .php) depending on the way your web/PHP server
82 interprets those extensions.
83 2. Untar or unzip the distribution (be sure to unzip the
84 subdirectories): tar xzvf phpMyAdmin_x.x.x.tar.gz in your
85 webserver's document root. If you don't have direct access to your
86 document root, put the files in a directory on your local machine,
87 and, after step 3, transfer the directory on your web server
88 using, for example, ftp.
89 3. Open the file config.inc.php3 in your favourite editor and change
90 the values for host, user, password and authentication mode to fit
91 your environment. Also insert the correct value for
92 $cfg['PmaAbsoluteUri']. Have a look at Configuration section for
93 an explanation of all values.
94 4. It is recommended that you protect the directory in which you
95 installed phpMyAdmin (unless it's on a closed intranet, or you
96 wish to use http or cookie authentication), for example with
97 HTTP-AUTH (in a .htaccess file). See the FAQ section for
98 additional information.
99 5. Open the file <www.your-host.com>/<your-install-dir>/index.php3 in
100 your browser. phpMyAdmin should now display a welcome screen and
101 your databases, or a login dialog if using http or cookie
104 Upgrading from an older version:
105 * Please do not copy your older config.inc.php3 over the new one: it
106 may offer new configuration variables, and the new version may
107 depend on these for normal behavior. It is suggested instead to
108 insert your site values in the new one.
110 Using authentication modes:
111 * Http and cookie authentication modes are recommended in a
112 multi-user environment where you want to give users access to
113 their own database and don't want them to play around with others.
114 Nevertheless be aware that MS Internet Explorer seems to be really
115 buggy about cookies, at least till version 6. And php 4.1.1 is
116 also a bit buggy in this area!
117 * Http and cookie authentication modes are more secure: the MySQL
118 password does not need to be set in the phpMyAdmin configuration
119 file (except for the "controluser" -see the Configuration
121 However, keep in mind that the password travels in plain text,
122 unless you are using the https protocol.
123 In cookie mode, we send the password in a temporary cookie, so
124 most browsers should not store the password in their cookie file.
125 * For 'http' and 'cookie' modes, phpMyAdmin needs a controluser that
126 has only the SELECT privilege on the mysql.user (all columns
127 except "Password"), mysql.db (all columns) & mysql.tables_priv
128 (all columns except "Grantor" & "Timestamp") tables.
129 You must specify the details for the controluser in the
130 config.inc.php3 file under the $cfg['Servers'][$i]['controluser']&
131 $cfg['Servers'][$i]['controlpass'] settings.
132 This example assumes you want to use pma as the controluser and
133 pmapass as the controlpass:
135 GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY
137 GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv,
138 Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv,
139 Process_priv, File_priv, Grant_priv, References_priv, Index_priv,
140 Alter_priv) ON mysql.user TO 'pma'@'localhost';
141 GRANT SELECT ON mysql.db TO 'pma'@'localhost';
142 GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON
143 mysql.tables_priv TO 'pma'@'localhost';
144 ... and if you want to use the many new relation and bookmark
146 GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db> TO
147 'pma'@'localhost'; (this of course requires you to have a special DB
148 for phpMyAdmin, the contents will be explained later)
149 * Then each of the true users should be granted of a set of
150 privileges on a set of particular databases but shouldn't have any
151 global privileges. For example, to grant the user real_user with
152 all privileges on the database user_base:
153 GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost
154 IDENTIFIED BY 'real_password';
155 What the user may now do is controlled entirely by the MySQL user
157 With http or cookie auth mode, you don't need to fill the
158 user/password fields inside the $cfg['Servers'] array.
160 'http' authentication mode:
161 * Was called 'advanced' in versions before 2.2.3.
162 * Introduced in 1.3.0, it uses Basic HTTP authentication method and
163 allows you to login as any valid MySQL user.
164 * Is only supported with PHP running as an Apache module, not with
167 'cookie' authentication mode:
168 * You can use this method as a replacement for the http
169 authentication (for example, if you're running IIS).
170 * Obviously, the user must enable cookies in the browser.
171 * With this mode, the use can truly logout of phpMyAdmin and login
172 back with the same username.
174 'config' authentication mode:
175 * This mode is the less secure one because it requires you to fill
176 the $cfg['Servers'][$i]['user'] and
177 $cfg['Servers'][$i]['password'] fields.
178 But you don't need to setup a "controluser" here: using the
179 $cfg['Servers'][$i]['only_db'] might be enough.
180 * In the ISP FAQ section, there is an entry explaining how to
181 protect your configuration file.
182 * For additional security in this mode, you may wish to consider the
183 Host authentication $cfg['Servers'][$i]['AllowDeny']['order'] and
184 $cfg['Servers'][$i]['AllowDeny']['rules'] configuration
186 ______________________________________________________________________
188 Top - Requirements - Introduction - Installation -
189 Configuration - FAQ - Developers - Credits
190 ______________________________________________________________________
194 Warning for Mac users: php seems not to like Mac end of lines
195 character ("\r"). So ensure you choose the option that allows to use
196 the *nix end of line character ("\n") in your text editor before
197 registering a script you have modified.
199 All configurable data is placed in config.inc.php3.
201 $cfg['PmaAbsoluteUri'] string
202 Sets here the complete url (with full path) to your phpMyAdmin
204 http://www.your_web.net/path_to_your_phpMyAdmin_directory/.
205 phpMyAdmin needs this setting, because of requirements of the
206 HTTP protocol, explained in RFC2616, section 14.30.
207 Don't forget the slash at the end of your url. The url must
208 contain characters that are valid for a url, and on some
209 servers, the path is case-sensitive.
210 Starting with version 2.3.0, you can try to leave this
211 parameter empty, because the program tries to auto-detect its
212 proper value. Additional details are in the configuration file.
213 Alternatively, this setting can be dynamically completed. For
214 example, you can try to use such a kind of code:
216 $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
217 . $_SERVER['HTTP_HOST']
218 . (!empty($_SERVER['SERVER_PORT']) ? ':' . $_SERVER['SER
220 . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_
225 $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
226 . $_SERVER['SERVER_NAME']
227 . (!empty($_SERVER['SERVER_PORT']) ? ':' . $_SERVER['SER
229 . substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['S
230 CRIPT_NAME'], '/')+1);
233 Please note that the $_SERVER array doesn't exist in
234 PHP < 4.1.0. Try to replace $_SERVER by $HTTP_SERVER_VARS or
235 $GLOBALS in this case.
237 $cfg['PmaAbsoluteUri_DisableWarning'] boolean
238 By default, when you leave $cfg['PmaAbsoluteUri'] empty, and
239 the system detects your absolute URI automatically, we display
240 a warning to remind you. If you have tested the automatic
241 detection, and it works perfectly for your setup, then you can
242 set this variable to squelch the warning.
244 $cfg['PmaNoRelation_DisableWarning'] boolean
245 Starting with version 2.3.0 phpMyAdmin offers a lot of features
246 to work with master / foreign - tables. These features require
247 the PMA administrator to set up a special database for PMA (see
248 $cfg['Servers'][$i]['pmadb']). Its contents and use will be
249 explained further down.
250 If you tried to set this up and it does not work for you have a
251 look on the "Structure" page of one database where you would
252 like to use it. You will find a link that will analyze why
253 those features have been disabled.
254 If you do not want to use those features set this variable to
255 TRUE to stop this message from appearing.
257 $cfg['Servers'] array
258 Since version 1.4.2, phpMyAdmin supports the administration of
259 multiple MySQL servers. Therefore, a $cfg['Servers']-array has
260 been added which contains the login information for the
261 different servers. The first $cfg['Servers'][$i]['host']
262 contains the hostname of the first server, the second
263 $cfg['Servers'][$i]['host'] the hostname of the second server,
264 etc. If you have only one server to administer, simply leave
265 free the hostname of the other $cfg['Server']-entries.
267 $cfg['Servers'][$i]['host'] string
268 The hostname of your $i-th MySQL-server. E.g. localhost.
270 $cfg['Servers'][$i]['port'] string
271 The port-number of your $i-th MySQL-server. Default is 3306
274 $cfg['Servers'][$i]['socket'] string
275 The path to the socket to use. Leave blank for default.
276 To use the socket feature you must run php 3.0.10 or more.
278 $cfg['Servers'][$i]['connect_type'] string
279 What type connection to use with the MySQL server. Your options
280 are 'socket' & 'tcp'. It defaults to 'tcp' as that is nearly
281 guarenteed to be available on all MySQL servers, while sockets
282 are not supported on some platforms.
284 $cfg['Servers'][$i]['controluser'] string
285 $cfg['Servers'][$i]['controlpass'] string
286 When using http or cookie authentication modes (or 'config'
287 authentication mode since phpMyAdmin 2.2.1), you need to supply
288 the details of a MySQL account that has SELECT privilege on the
289 mysql.user (all columns except "Password"), mysql.db (all
290 columns) & mysql.tables_priv (all columns except "Grantor" &
291 "Timestamp") tables. This account is used to check what
292 databases the user will see at login.
293 Please see the install section on "Using http authentication"
294 for more information.
295 Note that if you try login to phpMyAdmin with this
296 "controluser", you could get some errors, depending the exact
297 privileges you gave to the "controluser". phpMyAdmin does not
298 support a direct login with the "controluser".
299 In versions before 2.2.5, those were called "stduser/stdpass".
301 $cfg['Servers'][$i]['auth_type'] string ['http'|'cookie'|'config']
302 Whether config or cookie or http authentication should be used
305 + 'config' authentication ($auth_type = 'config') is the plain
306 old way: username and password are stored in config.inc.php3.
307 + 'cookie' authentication mode ($auth_type = 'cookie') as
308 introduced in 2.2.3 allows you to log in as any valid MySQL
309 user with the help of... cookies. Log name and password are
310 stored in cookies during the session and password is deleted
312 + 'http' authentication (was called 'advanced' in older
313 versions) ($auth_type = 'http') as introduced in 1.3.0 allows
314 you to log in as any valid MySQL user via HTTP-Auth.
316 Please see the install section on "Using authentication modes"
317 for more information.
319 $cfg['Servers'][$i]['user'] string
320 $cfg['Servers'][$i]['password'] string
321 The user/password-pair which phpMyAdmin will use to connect to
322 this MySQL-server. This user/password pair is not needed when
323 http or cookie authentication is used, and should be empty.
325 $cfg['Servers'][$i]['only_db'] string or array
326 If set to a(an array of) database name(s), only this(these)
327 database(s) will be shown to the user. Since phpMyAdmin 2.2.1,
328 this/these database(s) name(s) may contain MySQL wilcards
329 characters ("_" and "%"): if you want to use literal instances
330 of these characters, escape them (ie use 'my\_db' and not
332 This setting is an efficient way to lower the server charge
333 since the latter does not need to send MySQL requests to build
334 the available database list. But it does not replace the
335 privileges rules of the MySQL database server. If set, it just
336 means only these databases will be displayed but not at all
337 other databases can't be used.
339 $cfg['Servers'][$i]['verbose'] string
340 Only useful when using phpMyAdmin with multiple server entries.
341 If set, this string will be displayed instead of the hostname
342 in the pulldown menu on the main page. This can be useful if
343 you want to show only certain databases on your system, for
346 $cfg['Servers'][$i]['pmadb'] string
347 Starting with version 2.3.0 phpMyAdmin offers a lot of features
348 to work with master / foreign - tables. To use those as well as
349 the bookmark feature you will need to create a new db.
350 To use this functionality as superuser create a new database:
352 + create a new database for phpmyadmin:
353 CREATE DATABASE phpmyadmin;
354 Note that "controluser" must have SELECT, INSERT and DELETE
355 privileges on this database. Here is a query to set up those
356 privileges (using "phpmyadmin" as the database name, and
357 "pma" as the controluser):
358 GRANT SELECT,INSERT,DELETE ON phpmyadmin.* to
360 do not give any other user rights on this database.
361 + enter the databasename in $cfg['Servers'][$i]['pmadb']
363 $cfg['Servers'][$i]['bookmarktable'] string
364 Since release 2.2.0 phpMyAdmin allows to bookmark queries. This
365 can be useful for queries you often run.
366 To allow the usage of this functionality the superuser has to:
368 + set up a PMA database as described above
369 + within this database create a table following this scheme:
370 CREATE TABLE `PMA_bookmark` (
371 id int(11) DEFAULT '0' NOT NULL auto_increment,
372 dbase varchar(255) NOT NULL,
373 user varchar(255) NOT NULL,
374 label varchar(255) NOT NULL,
377 ) TYPE=MyISAM COMMENT='Bookmarks';
378 + enter the tablename in $cfg['Servers'][$i]['bookmarktable']
380 $cfg['Servers'][$i]['relation'] string
381 Since release 2.2.4 you can describe, in a special 'relation'
382 table, which field is a key in another table (a foreign key).
383 phpMyAdmin currently uses this to
385 + make clickable, when you browse the master table, the data
386 values that point to the foreign table;
387 + display in an optional tooltip the "display field" when
388 browsing the master table, if you move the mouse to a column
389 containing a foreign key (use also the 'table_info' table);
390 + display links on the table properties page, to check
391 referential integrity (display missing foreign keys) for each
393 + in query-by-example, create automatic joins (see an example
394 in the FAQ, section "Using phpMyAdmin");
395 + enable you to get a PDF schema of your database (also uses
396 the table_coords table).
398 The keys can be numeric or character.
399 To allow the usage of this functionality the superuser has to:
401 + set up a PMA database as described above
402 + within this database create a table following this scheme:
403 CREATE TABLE `PMA_relation` (
404 `master_db` varchar(64) NOT NULL default '',
405 `master_table` varchar(64) NOT NULL default '',
406 `master_field` varchar(64) NOT NULL default '',
407 `foreign_db` varchar(64) NOT NULL default '',
408 `foreign_table` varchar(64) NOT NULL default '',
409 `foreign_field` varchar(64) NOT NULL default '',
410 PRIMARY KEY (`master_db`, `master_table`,
412 KEY foreign_field (foreign_db, foreign_table)
413 ) TYPE=MyISAM COMMENT='Relation table';
414 + put the relation table name in
415 $cfg['Servers'][$i]['relation']
416 + now as normal user open phpMyAdmin and for each one of your
417 tables where you want to use this feature, click
418 "Structure/Relation view/" and choose foreign fields.
420 Please note that in the current (2.3.0) version, master_db must
421 be the same as foreign_db. Those fields have been put in future
422 development of the cross-db relations.
424 $cfg['Servers'][$i]['table_info'] string
425 Since release 2.3.0 you can describe, in a special 'table_info'
426 table, which field is to be displayed as a tooltip when moving
427 the cursor over the corresponding key.
428 This configuration variable will hold the name of this special
429 table. To allow the usage of this functionality the superuser
432 + set up a PMA database as described above
433 + within this database create a table following this scheme:
434 CREATE TABLE `PMA_table_info` (
435 `db_name` varchar(64) NOT NULL default '',
436 `table_name` varchar(64) NOT NULL default '',
437 `display_field` varchar(64) NOT NULL default '',
438 PRIMARY KEY (`db_name`, `table_name`)
439 ) TYPE=MyISAM COMMENT='Table information for
441 + put the table name in $cfg['Servers'][$i]['table_info']
442 + then for each table where you want to use this feature, click
443 "Structure/Relation view/Choose field to display" to choose
446 Usage tip: Display field.
448 $cfg['Servers'][$i]['table_coords'] string
449 $cfg['Servers'][$i]['pdf_pages'] string
450 Since release 2.3.0 you can have phpMyAdmin create PDF pages
451 showing the relations between your tables. To do this it needs
452 two tables "pdf_pages" (storing information about the available
453 pdf pages) and "table_coords" (storing coordinates where each
454 table will be placed on a PDF schema output).
455 You must be using the "relation" feature and have a table of
456 PDF pages (see $cfg['Servers'][$i]['pdf_pages']) to create PDF
458 To allow the usage of this functionality the superuser has to:
460 + set up a PMA database as described above
461 + within this database create a table following this scheme:
462 CREATE TABLE `PMA_table_coords` (
463 `db_name` varchar(64) NOT NULL default '',
464 `table_name` varchar(64) NOT NULL default '',
465 `pdf_page_number` int NOT NULL default '0',
466 `x` float unsigned NOT NULL default '0',
467 `y` float unsigned NOT NULL default '0',
468 PRIMARY KEY (`db_name`, `table_name`,
470 ) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin
472 + also within this database create:
473 CREATE TABLE `PMA_pdf_pages` (
474 `db_name` varchar(64) NOT NULL default '',
475 `page_nr` int(10) unsigned NOT NULL auto_increment,
476 `page_descr` varchar(50) NOT NULL default '',
477 PRIMARY KEY (page_nr),
479 ) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';
480 + put the first table name in
481 $cfg['Servers'][$i]['table_coords'] and the second table name
482 in $cfg['Servers'][$i]['pdf_pages']
484 Usage tips: PDF output.
486 $cfg['Servers'][$i]['column_comments'] string
487 Since release 2.3.0 you can store comments to describe each
488 column for each table. These will then be shown on the
490 To allow the usage of this functionality the superuser has to:
492 + set up a PMA database as described above
493 + within this database create a table following this scheme:
494 CREATE TABLE `PMA_column_comments` (
495 id int(5) unsigned NOT NULL auto_increment,
496 db_name varchar(64) NOT NULL default '',
497 table_name varchar(64) NOT NULL default '',
498 column_name varchar(64) NOT NULL default '',
499 comment varchar(255) NOT NULL default '',
501 UNIQUE KEY db_name (db_name, table_name, column_name)
502 ) TYPE=MyISAM COMMENT='Comments for Columns';
503 + put the table name in $cfg['Servers'][$i]['column_comments']
505 $cfg['Servers'][$i]['AllowDeny']['order'] string
506 If your rule order is empty, then IP authentication is
508 If your rule order is set to 'deny,allow' then the system
509 applies all deny rules followed by allow rules. Access is
510 allowed by default. Any client which does not match a Deny
511 command or does match an Allow command will be allowed access
513 If your rule order is set to 'allow,deny' then the system
514 applies all allow rules followed by deny rules. Access is
515 denied by default. Any client which does not match an Allow
516 directive or does match a Deny directive will be denied access
518 If your rule order is set to 'explicit', the authentication is
519 performed in a similar fashion to rule order 'deny,allow', with
520 the added restriction that your host/username combination must
521 be listed in the allow rules, and not listed in the deny rules.
522 This is the most secure means of using Allow/Deny rules, and
523 was available in Apache by specifying allow and deny rules
524 without setting any order.
526 $cfg['Servers'][$i]['AllowDeny']['rules'] array of strings
527 The general format for the rules is as such:
528 <'allow' | 'deny'> <username> [from] <ipmask>
529 If you wish to match all users, it is possible to use a '%' as
530 a wildcard in the username field.
531 There are a few shortcuts you can use in the ipmask field as
534 'localhost' -> 127.0.0.1/8
535 Having an empty rule list is equivalent to either using 'allow
536 % from all' if your rule order is set to 'deny,allow' or 'deny
537 % from all' if your rule order is set to 'allow,deny' or
539 For the IP matching system, the following work:
540 xxx.xxx.xxx.xxx (an exact IP address)
541 xxx.xxx.xxx.[yyy-zzz] (an IP address range)
542 xxx.xxx.xxx.xxx/nn (CIDR, Classless Inter-Domain Routing type
544 But the following does not work:
545 xxx.xxx.xxx.xx[yyy-zzz] (partial IP address range)
547 $cfg['ServerDefault'] integer
548 If you have more than one server configured, you can set
549 $cfg['ServerDefault'] to any one of them to autoconnect to that
550 server when phpMyAdmin is started, or set it to 0 to be given a
551 list of servers without logging in.
552 If you have only one server configured, $cfg['ServerDefault']
553 MUST be set to that server.
555 $cfg['OBGzip'] boolean
556 Defines whether to use gzip output buffering for increased
557 speed in HTTP transfers.
559 $cfg['PersistentConnections'] boolean
560 Whether persistent connections should be used or not
561 (mysql_connect or mysql_pconnect).
563 $cfg['ExecTimeLimit'] integer [number of seconds]
564 Set the number of seconds a script is allowed to run. If
565 seconds is set to zero, no time limit is imposed.
566 This setting is used while importing/exporting dump files but
567 has no effect when PHP is running in safe mode.
569 $cfg['SkipLockedTables'] boolean
570 Mark used tables and make it possible to show databases with
571 locked tables (since 3.23.30).
573 $cfg['ShowSQL'] boolean
574 Defines whether sql-queries generated by phpMyAdmin should be
577 $cfg['AllowUserDropDatabase'] boolean
578 Defines whether normal users (non-administrator) are allowed to
579 delete their own database or not. If set as FALSE, the link
580 "Drop Database" will not be shown, and even a "DROP DATABASE
581 mydatabase" will be rejected. Quite practical for ISP's with
584 $cfg['Confirm'] boolean
585 Whether a warning ("Are your really sure..") should be
586 displayed when you're about to loose data.
588 $cfg['LoginCookieRecall'] boolean
589 Define whether the previous login should be recalled or not in
590 cookie authentication mode.
592 $cfg['UseDbSearch'] boolean
593 Define whether the "search string inside database" is enabled
596 $cfg['LeftFrameLight'] boolean
597 Defines whether to use select-based menu and display only the
598 current tables in the left frame (smaller page).
600 $cfg['ShowTooltip'] boolean
601 Defines whether to display table comment as tooltip in left
604 $cfg['ShowStats'] boolean
605 Defines whether to display space usage and statistics about
606 databases and tables or not.
607 Note that statistics requires at least MySQL 3.23.3 and that,
608 at this date, MySQL doesn't return such information for
611 $cfg['ShowMysqlInfo'] boolean
612 $cfg['ShowMysqlVars'] boolean
613 $cfg['ShowPhpInfo'] boolean
614 $cfg['ShowChgPassword'] boolean
615 Defines whether to display the "MySQL runtime information",
616 "MySQL system variables", "PHP information" and "Change
617 password " links or not for simple users at the starting main
618 (right) frame. This setting does not check MySQL commands
620 Please note that to block the usage of phpinfo() in scripts,
621 you have to put this in your php.ini:
622 disable_functions = phpinfo()
623 Also note that enabling the "Change password " link has no
624 effect with "config" authentication mode: because of the hard
625 coded password value in the configuration file, end users can't
626 be allowed to change their passwords.
628 $cfg['SuggestDBName'] boolean
629 Defines whether to suggest a database name on the "Create
630 Database" form or to keep the textfield empty.
632 $cfg['ShowBlob'] boolean
633 Defines whether BLOB fields are shown when browsing a table's
636 $cfg['NavigationBarIconic'] boolean
637 Defines whether navigation bar buttons contain text or symbols
640 $cfg['ShowAll'] boolean
641 Defines whether an user should be displayed a "show all
642 (records)" button in browse mode or not.
644 $cfg['MaxRows'] integer
645 Number of rows displayed when browsing a resultset. If the
646 resultset contains more rows, Previous/Next links will be
649 $cfg['Order'] string [DESC|ASC|SMART]
650 Defines whether fields are displayed in ascending (ASC) order,
651 in descending (DESC) order or in a "smart" (SMART) order -ie
652 descending order for fields of type TIME, DATE, DATETIME &
653 TIMESTAMP, ascending order else- by default.
655 $cfg['ProtectBinary'] boolean or string
656 Defines whether BLOB or BINARY fields are protected from
657 edition when browsing a table's content or not. Valid values
659 - FALSE to allow edition of all fields;
660 - blob to allow edition of all fields except BLOBS;
661 - all to disallow edition of all BINARY or BLOB fields.
663 $cfg['ShowFunctionFields'] boolean
664 Defines whether MySQL functions fields should be displayed or
665 not in edit/insert mode.
667 $cfg['ZipDump'] boolean
668 $cfg['GZipDump'] boolean
669 $cfg['BZipDump'] boolean
670 Defines whether to allow the use of zip/gzip/bzip compression
671 when creating a dump file or not.
673 $cfg['DefaultTabDatabase'] string
674 Defines the tab displayed by default on database view. Possible
675 values: "db_details_structure.php3", "db_details.php3" or
678 $cfg['DefaultTabTable'] string
679 Defines the tab displayed by default on table view. Possible
680 values: "tbl_properties_structure.php3", "tbl_properties.php3",
681 "tbl_select.php3" or "tbl_change.php3".
683 $cfg['MySQLManualBase'] string
684 If set to an URL which points to the MySQL documentation (type
685 depends on $cfg['MySQLManualType']), appropriate help links are
687 See MySQL Documentation page for more information about MySQL
688 manuals and their types.
690 $cfg['MySQLManualType'] string
691 Type of MySQL documentation:
693 + old - old style used in phpMyAdmin 2.3.0 and sooner
694 + searchable - "Searchable, with user comments"
695 + chapters - "HTML, one page per chapter"
696 + big - "HTML, all on one page"
697 + none - do not show documentation links
699 $cfg['DefaultLang'] string
700 Defines the default language to use, if not browser-defined or
702 See the select_lang.inc.php3 script to know the valid values
706 Force: always use this language (must be defined in the
707 select_lang.inc.php3 script).
709 $cfg['DefaultCharset'] string
710 Default charset to use for recoding of MySQL queries. This must
711 be enabled and it's described by $cfg['AllowAnywhereRecoding']
713 You can give here any charset which is in
714 $cfg['AvailableCharsets'] array and this is just default
715 choice, user can select any of them.
717 $cfg['AllowAnywhereRecoding'] boolean
718 Allow charset recoding of MySQL queries. You need recode or
719 iconv support (compiled in or module) in php to allow MySQL
720 queries recoding and used language file must have it enabled
721 (by default only these which are in unicode, just to avoid
722 losing some characters).
724 $cfg['RecodingEngine'] string
725 You can select here which functions will be used for charset
726 conversion. Possible values are:
728 + auto - automatically use available one (first is tested
730 + iconv - use iconv or libiconv functions
731 + recode - use recode_string function
735 $cfg['AvailableCharsets'] array
736 Available charsets for MySQL conversion. You can add your own
737 (any of supported by recode/iconv) or remove these which you
738 don't use. Charsets will be shown in same order as here listed,
739 so if you frequently use some of these move them to the top.
741 $cfg['LeftWidth'] integer
742 Left frame width in pixel.
744 $cfg['LeftBgColor'] string [HTML color]
745 $cfg['RightBgColor'] string [HTML color]
746 The background colors (HTML) used for both the frames.
748 $cfg['RightBgImage'] string
749 The URI of the background image used for the right frame. It
750 can be absolute as well as relative from your phpMyAdmin
753 $cfg['LeftPointerColor'] string [HTML color]
754 The color (HTML) used for the pointer in the left frame (does
757 $cfg['Border'] integer
758 The size of a table's border.
760 $cfg['ThBgcolor'] string [HTML color]
761 The color (HTML) used for table headers.
763 $cfg['BgcolorOne'] string [HTML color]
764 The color (HTML) #1 for table rows.
766 $cfg['BgcolorTwo'] string [HTML color]
767 The color (HTML) #2 for table rows.
769 $cfg['BrowsePointerColor'] string [HTML color]
770 $cfg['BrowseMarkerColor'] string [HTML color]
771 The colors (HTML) uses for the pointer and the marker in browse
772 mode (does not work with NS4).
773 The former feature highlights the row over which your mouse is
774 passing and the latter lets you visually mark/unmark rows by
776 You can disable both of these features by emptying the
777 respective directive.
779 $cfg['TextareaCols'] integer
780 $cfg['TextareaRows'] integer
781 Number of columns and rows for the textareas.
782 This value will be emphasized (*2) for sql query textareas.
784 $cfg['TextareaAutoSelect'] boolean
785 Defines if the whole textarea of the query box will be selected
788 $cfg['LimitChars'] integer
789 Maximal number of Chars showed in a TEXT OR a BLOB field on
790 browse view. Can be turned off by a toggle button on the browse
793 $cfg['ModifyDeleteAtLeft'] boolean
794 $cfg['ModifyDeleteAtRight'] boolean
795 Defines the place where modify and delete links would be put
796 when tables contents are displayed (you may have them displayed
797 both at the left and at the right). "Left" and "right" are
798 parsed as "top" and "bottom" with vertical display mode.
800 $cfg['DefaultDisplay'] string
801 There are 2 display modes: horizontal and vertical. Define
802 which one is displayed by default.
804 $cfg['UploadDir'] string
805 The name of the directory, ending with a slash, where SQL files
806 have been uploaded by other means than phpMyAdmin (for example,
807 ftp). Those files are available under a drop-down box when you
808 click the database name, then the SQL tab.
809 Please note that the file names must have the suffix ".sql".
810 This feature is useful when your file is too big to be uploaded
811 via HTTP, or when file uploads are disabled in PHP.
812 Please note that if PHP is running in safe mode, this directory
813 must be owned by the same user as the owner of the phpMyAdmin
816 $cfg['RepeatCells'] integer
817 Repeat the headers every X cells, or 0 to deactivate.
819 $cfg['SQP']['enable'] boolean
820 As of phpMyAdmin 2.3.0, we now have a fully functional SQL
821 Parser system. It is enabled by default, as it is used to
822 format the SQL queries.
823 As of 2.3.1, it will become an integral part of phpMyAdmin, as
824 it will analyze certain queries to improve the behavior of
825 phpMyAdmin. But as it is very new, and not yet heavily used, we
826 offer you an option to turn it off.
828 $cfg['SQP']['fmtType'] string [html|none]
829 The main use of the new SQL Parser is to pretty-print SQL
830 queries. By default we use HTML to format the query, but you
831 can disable this by setting this varible to 'none'
833 $cfg['SQP']['fmtInd'] float
834 $cfg['SQP']['fmtIndUnit'] string [em|px|pt|ex]
835 For the pretty-printing of SQL queries, under some cases the
836 part of a query inside a bracket is indented. By changing
837 $cfg['SQP']['fmtInd'] you can change the amount of this indent.
838 Related in purpose is $cfg['SQP']['fmtIndUnit'] which specifies
839 the units of the indent amount that you specified. This is used
842 $cfg['SQP']['fmtColor'] array of string tuples
843 This array is used to define the colours for each type of
844 element of the pretty-printed SQL queries. The tuple format is
845 class => [HTML colour code | empty string]
846 If you specify an empty string for the color of a class, it is
847 ignored in creating the stylesheet. You should not alter the
848 class names, only the colour strings.
851 + comment Applies to all comment sub-classes
852 + comment_mysql Comments as "#...\n"
853 + comment_ansi Comments as "-- ...\n"
854 + comment_c Comments as "/*...*/"
855 + digit Applies to all digit sub-classes
856 + digit_hex Hexadecimal numbers
857 + digit_integer Integer numbers
858 + digit_float Floating point numbers
859 + punct Applies to all punctuation sub-classes
860 + punct_bracket_open_round Opening brackets"("
861 + punct_bracket_close_round Closing brackets ")"
862 + punct_listsep List item seperator ","
863 + punct_qualifier Table/Column Qualifer "."
864 + punct_queryend End of query marker ";"
865 + alpha Applies to all alphabetic classes
866 + alpha_columnType Identifers matching a column type
867 + alpha_columnAttrib Identifers matching a
868 database/table/column attribute
869 + alpha_functionName Identifiers matching a MySQL function name
870 + alpha_reservedWord Identifiers matching any other reserved
872 + alpha_variable Identifers matching a SQL variable "@foo"
873 + alpha_identifier All other identifiers
874 + quote Applies to all quotation mark classes
875 + quote_double Double quotes "
876 + quote_single Single quotes '
877 + quote_backtick Backtick quotes `
879 $cfg['SQLValidator']['use'] boolean
880 phpMyAdmin now supports use of the Mimer SQL Validator service,
881 as originally published on Slashdot.
882 For help in setting up your system to use the service, see the
885 $cfg['SQLValidator']['username'] string
886 $cfg['SQLValidator']['password'] string
887 The SOAP service allows you to login with anonymous and any
888 password, so we use those by default.. Instead, if you have an
889 account with them, you can put your login details here, and it
890 will be used in place of the anonymous login.
892 $cfg['ColumnTypes'] array
893 All possible types of a MySQL column. In most cases you don't
896 $cfg['AttributeTypes'] array
897 Possible attributes for fields. In most cases you don't need to
900 $cfg['Functions'] array
901 A list of functions MySQL supports. In most cases you don't
903 ______________________________________________________________________
905 Top - Requirements - Introduction - Installation -
906 Configuration - FAQ - Developers - Credits
907 ______________________________________________________________________
909 FAQ - Frequently Asked Questions
911 Server - Configuration - Limitations - Multi-user - Browsers
912 - Usage tips - Project
916 [1.1] I'm running php 4+ and my server is crashing each time a
917 specific action is required or phpMyAdmin sends a blank page or a page
918 full of cryptic characters to my browser, what can I do?
919 There are some known php bugs with output buffering and compression.
920 Try to set the $cfg['OBGzip'] directive to FALSE in your
921 config.inc.php or .php3 file and the zlib.output_compression directive
922 to Off in your php configuration file.
923 Furthermore, we know about such problems connected to the release
924 candidates of php 4.2.0 (tested with php 4.2.0 RC1 to RC4) together
925 with MS Internet Explorer. Please upgrade to the release version php
928 [1.2] My Apache server crashes when using phpMyAdmin.
929 You should first try the latest versions of Apache (and possibly
931 See also the other FAQ entry about php bugs with output buffering.
932 If your server keeps crashing, please ask for help in the various
933 Apache support groups.
935 [1.3] I'm running phpMyAdmin with "cookie" authentication mode under
936 PHP 4.2.0 or 4.2.1 loaded as an Apache 2+ module but can't enter the
937 script: I'm always displayed the login screen.
938 This is a kown PHP bug (see this bug report) from the official php bug
939 database. It means there is and won't be any phpMyAdmin fix against it
940 because there is no way to code a fix.
942 [1.4] Using phpMyAdmin on IIS, I'm displayed the error message: "The
943 specified CGI application misbehaved by not returning a complete set
945 You just forgot to read the install.txt file from the php
946 distribution. Have a look at the last message in this bug report from
947 the official php bug database.
949 [1.5] Using phpMyAdmin on IIS, I'm facing crashes and/or many error
950 messages with the http or advanced authentication mode.
951 This is a known problem with the php ISAPI filter: it's not so stable.
952 For some more information and complete testings see the messages
953 posted by André B. aka "djdeluxe76" in this thread from the phpWizard
955 Please use instead the cookie authentication mode.
957 [1.6] I can't use phpMyAdmin on PWS: nothing is displayed!
958 This seems to be a PWS bug. Filippo Simoncini found a workaroud (at
959 this time there is no better fix): remove or comment the DOCTYPE
960 declarations (2 lines) from the scripts header.inc.php3,
961 header_printview.inc.php3, index.php3, left.php3 and
962 libraries/common.lib.php3.
964 [1.7] How can I GZip or Bzip a dump or a CSV export. It seems to not
966 These features are based on the gzencode() and bzcompress() php
967 functions to be more independent of the platform (Unix/Windows, Safe
968 Mode or not, and so on). So, you must have PHP4 >= 4.0.4 and
969 Zlib/Bzip2 support (--with-zlib and --with-bz2).
970 We faced php crashes when trying to download a dump with MS Internet
971 Explorer when phpMyAdmin is run with a release candidate of php 4.2.0.
972 In this case you should switch to the release version of php 4.2.0.
974 [1.8] I cannot insert a text file in a table, and I get an error about
975 safe mode being in effect.
976 Your uploaded file is saved by PHP in the "upload dir", as defined in
977 php.ini by the variable upload_tmp_dir (usually the system default is
979 We recommend the following setup for Apache servers running in safe
980 mode, to enable uploads of files while being reasonably secure:
981 * create a separate directory for uploads: mkdir /tmp/php
982 * give ownership to the Apache server's user.group: chown
983 apache.apache /tmp/php
984 * give proper permission: chmod 600 /tmp/php
985 * put upload_tmp_dir = /tmp/php in php.ini
988 [1.9] I'm having troubles when uploading files. In general file
989 uploads don't work on my system and uploaded files have a
990 Content-Type: header in the first line.
991 It's not really phpMyAdmin related but RedHat 7.0. You have a RedHat
992 7.0 and you updated your php rpm to php-4.0.4pl1-3.i386.rpm, didn't
994 So the problem is that this package has a serious bug that was
995 corrected ages ago in php (2001-01-28: see php's bug tracking system
996 for more details). The problem is that the bugged package is still
997 available though it was corrected (see redhat's bugzilla for more
999 So please download the fixed package (4.0.4pl1-9) and the problem
1001 And that fixes the \r\n problem with file uploads!
1003 [1.10] I'm having troubles when uploading files with phpMyAdmin
1004 running on a secure server. My browser is Internet Explorer and I'm
1005 using the Apache server.
1006 As suggested by "Rob M" in the phpWizard forum, add this line to your
1008 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
1009 It seems to clear up many problems between IE and SSL.
1011 [1.11] I get an 'open_basedir restriction' while uploading a file from
1013 Since version 2.2.4, phpMyAdmin supports servers with open_basedir
1014 restrictions. Assuming that the restriction allows you to open files
1015 in the current directory ('.'), all you have to do is create a 'tmp'
1016 directory under the phpMyAdmin install directory, with permissions 777
1017 and the same owner as the owner of your phpMyAdmin directory. The
1018 uploaded files will be moved there, and after execution of your SQL
1021 [1.12] I have lost my MySQL root password, what can I do?
1022 The MySql manual explains how to reset the permissions.
1024 [1.13] I get an error 'No SQL query' when trying to execute a
1026 If PHP does not have read/write access to its upload_tmp_dir, it
1027 cannot access the uploaded query.
1029 [1.14] I get an error 'No SQL query' when trying to submit a query
1030 from the convenient text area.
1031 Check the post_max_size directive from your php configuration file and
1034 [1.15] I have problems with mysql.user field names.
1035 In older MySQL versions, the User and Password fields were named user
1036 and password. Please modify your field names to align with current
1039 [1.16] I cannot upload big dump files.
1040 The first things to check (or ask your host provider to check) are the
1041 values of upload_max_filesize, memory_limit and post_max_size in the
1042 php.ini configuration file.
1043 All of these three settings limit the maximum size of data that can be
1044 submitted and handled by php. One user also said that post_max_size
1045 and memory_limit need to be larger than upload_max_filesize.
1047 [1.17] Does phpMyAdmin support MySQL 4?
1048 MySQL 4 is not yet fully supported by phpMyAdmin.
1049 Because of MySQL 4's backwards compatibility you can use phpMyAdmin
1050 for administering MySQL 4 servers, but phpMyAdmin does not yet support
1051 its new features. Please notice that in this case it is recommended to
1052 use php >= 4.1 since older versions of php are not compatible to
1054 Furthermore, several users reported problems with phpMyAdmin related
1055 to bugs in MySQL 4. MySQL 4 is still an alpha release and should be
1056 used for test purposes only!
1058 [1.18] I'm running MySQL <= 4.0.1 having lower_case_table_names set to
1059 1. If I create a new table with a capital letter in its name it is
1060 changed to lowercase as it should. But if I try to DROP this table
1061 MySQL is unable to find the corresponding file.
1062 This is a bug of MySQL <= 4.0.1. Please upgrade to at least
1063 MySQL 4.0.2 or turn off your lower_case_table_names directive.
1065 [1.19] I can't run the "display relations" feature because the script
1066 seems not to know the font face I'm using!
1067 The "FPDF" library we're using for this feature requires some special
1068 files to use font faces.
1069 Please refers to the FPDF manual to build these files.
1071 [1.20] I receive the error "cannot load MySQL extension, please check
1073 To connect to a MySQL server, PHP needs a set of MySQL functions
1074 called "MySQL extension". This extension may be part of the PHP server
1075 (compiled-in), otherwise it needs to be loaded dynamically. Its name
1076 is probably mysql.so or mysql.dll. phpMyAdmin tried to load the
1077 extension but failed.
1078 Usually, the problem is solved by installing a software package called
1079 "PHP-MySQL" or something similar.
1081 [1.21] I am running the CGI version of PHP under Unix, and I cannot
1082 login using cookie auth.
1083 In php.ini, set mysql.max_links higher than 1.
1085 [1.22] I don't see the "Location of text file" field, so I cannot
1087 This is most likely because in php.ini, your file_uploads parameter is
1090 [1.23] I'm running MySQL on a Win32 machine. Each time I create a new
1091 table the table and field names are changed to lowercase!
1092 This happens because the MySQL directive lower_case_table_names
1093 defaults to 1 (ON) in the Win32 version of MySQL. You can change this
1094 behavior by simply changing the directive to 0 (OFF):
1095 Just edit you my.ini file that should be located in your Windows
1096 directory and add the following line:
1097 lower-case-table-names=0
1098 Next, save the file and restart the MySQL service. You can always
1099 check the value of this directive using the query
1100 SHOW VARIABLES LIKE 'lower_case_table_names';
1104 [2.1] The error message "Warning: Cannot add header information -
1105 headers already sent by ..." is displayed, what's the problem?
1106 Edit your config.inc.php or .php3 file and ensure there is nothing (ie
1107 no blank lines, no spaces, no characters...) neither before the <?php
1108 tag at the beginning, neither after the ?> tag at the end.
1110 [2.2] phpMyAdmin can't connect to MySQL. What's wrong?
1111 Either there is an error with your PHP setup or your username/password
1112 is wrong. Try to make a small script which uses mysql_connect and see
1113 if it works. If it doesn't, it may be you haven't even compiled MySQL
1116 [2.3] The error message "Warning: MySQL Connection Failed: Can't
1117 connect to local MySQL server through socket '/tmp/mysql.sock'
1118 (111)..." is displayed. What can I do?
1119 For RedHat users, Harald Legner suggests this on the mailing list:
1120 On my RedHat-Box the socket of mysql is /var/lib/mysql/mysql.sock. In
1121 your php.ini you will find a line
1122 mysql.default_socket = /tmp/mysql.sock
1124 mysql.default_socket = /var/lib/mysql/mysql.sock
1125 Then restart apache and it will work.
1126 Here is a fix suggested by Brad Ummer in the phpwizard forum:
1127 * First, you need to determine what socket is being used by MySQL.
1128 To do this, telnet to your server and go to the MySQL bin
1129 directory. In this directory there should be a file named
1130 mysqladmin. Type ./mysqladmin variables, and this should give you
1131 a bunch of info about your MySQL server, including the socket
1132 (/tmp/mysql.sock, for example).
1133 * Then, you need to tell PHP to use this socket.
1134 Assuming you are using PHP 3.0.10 or better, you can specify the
1135 socket to use when you open the connection. To do this in
1136 phpMyAdmin, you need to complete the socket information in the
1138 For example: $cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
1140 Have also a look at the corresponding section of the MySQL
1143 [2.4] Nothing is displayed by my browser when I try to run phpMyAdmin,
1145 Try to set the $cfg['OBGZip'] directive to FALSE in the phpMyAdmin
1146 configuration file. It helps sometime.
1147 Also have a look at your php version number: if it contains "4.0b..."
1148 it means you're running a beta version of PHP. That's not a so good
1149 idea, please upgrade to a plain revision.
1151 [2.5] Each time I want to insert or change a record or drop a database
1152 or a table, an error 404 (page not found) is displayed or, with http
1153 or cookie authentication, I'm asked to login again. What's wrong?
1154 Check the value you set for the $cfg['PmaAbsoluteUri'] directive in
1155 the phpMyAdmin configuration file.
1157 [3. Known limitations]
1159 [3.1] When using http authentication, an user who logged out can not
1160 relog in with the same nick.
1161 This is related to the authentication mechanism (protocol) used by
1162 phpMyAdmin. We plan to change it as soon as we may find enough free
1163 time to do it, but you can bypass this problem: just close all the
1164 opened browser windows and then go back to phpMyAdmin. You should be
1165 able to logs in again.
1167 [3.2] When dumping a large table in compressed mode, I get a memory
1168 limit error or a time limit error.
1169 As of version 2.2.4, we build the compressed dump in memory, so large
1170 tables dumps may hang. The only alternative we can think about (using
1171 system calls to mysqldump then gzip or bzip2) would not be applicable
1172 in environments where PHP is in safe mode: access to system programs
1173 is is limited by the system administrator, and time limit is enforced.
1175 [3.3] With InnoDB tables, I lose foreign key relationships when I
1176 rename or alter a table.
1177 This seems to be a InnoDB bug (fixed in MySQL 3.23.50?). However, keep
1178 in mind that phpMyAdmin as of version 2.3.0 does not support InnoDB.
1180 [4. ISPs, multi-user installations ]
1182 [4.1] I'm an ISP. Can I setup one central copy of phpMyAdmin or do I
1183 need to install it for each customer?
1184 Since version 2.0.3, you can setup a central copy of phpMyAdmin for
1185 all your users. The development of this feature was kindly sponsored
1186 by NetCologne GmbH. This requires a properly setup MySQL user
1187 management and phpMyAdmin http or cookie authentication. See the
1188 install section on "Using http authentication".
1190 [4.2] What's the preferred way of making phpMyAdmin secure against
1192 This depends on your system.
1193 If you're running a server which cannot be accessed by other people,
1194 it's sufficient to use the directory protection bundled with your
1195 webserver (with Apache you can use .htaccess files, for example).
1196 If other people have telnet access to your server, you should use
1197 phpMyAdmin's http authentication feature.
1199 * Your config.inc.php3 file should be chmod 660.
1200 * All your phpMyAdmin files should be chown phpmy.apache, where
1201 phpmy is a user whose password is only known to you, and apache is
1202 the group under which Apache runs.
1203 * You should use PHP safe mode, to protect from other users that try
1204 to include your config.inc.php3 in their scripts.
1206 [4.3] I get errors about not being able to include a file in /lang or
1208 Check php.ini, or ask your sysadmin to check it. The include_path must
1209 contain "." somewhere in it, and open_basedir, if used, must contain
1210 "." and "./lang" to allow normal operation of phpMyAdmin.
1212 [4.4] phpMyAdmin always gives "Access denied" when using http
1214 This could happen for several reasons:
1215 * $cfg['Servers'][$i]['controluser'] and/or
1216 $cfg['Servers'][$i]['controlpass'] are wrong.
1217 * The username/password you specify in the login-dialog are invalid.
1218 * You have already setup a security mechanism for the
1219 phpMyAdmin-directory, eg. a .htaccess file. This would interfere
1220 with phpMyAdmin's authentication, so remove it.
1222 [4.5] Is it possible to let users create their own databases?
1223 Starting with 2.2.5, in the user management page, you can enter a
1224 wildcard database name for a user, and put the privileges you want.
1225 For example, adding SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
1226 INDEX, ALTER would let a user create/manage his/her database(s).
1228 [4.6] How can I use the Host-based authentication additions?
1229 If you have existing rules from an old .htaccess file, you can take
1230 them and add a username between the 'deny'/'allow' and 'from' strings.
1231 Using the username wildcard of '%' would be a major benefit here if
1232 your installation is suited to using it. Then you can just add those
1233 updated lines into the $cfg['Servers'][$i]['AllowDeny']['rules']
1235 If you want a pre-made sample, you can try this fragment. It stops the
1236 'root' user from logging in from any networks other than the private
1238 //block root from logging in except from the private networks
1239 $cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
1240 $cfg['Servers'][$i]['AllowDeny']['rules'] = array(
1241 'deny root from all',
1242 'allow root from localhost',
1243 'allow root from 10.0.0.0/8',
1244 'allow root from 192.168.0.0/16',
1245 'allow root from 172.16.0.0/12',
1248 [5. Browsers or client OS]
1250 [5.1] I get an out of memory error, and my controls are
1251 non-functional, when trying to create a table with more than 14
1253 We could reproduce this problem only under Win98/98SE. Testing under
1254 WinNT4 or Win2K, we could easily create more than 60 fields.
1255 A workaround is to create a smaller number of fields, then come back
1256 to your table properties and add the other fields.
1258 [5.2] With Xitami 2.5b4, phpMyAdmin won't process form fields.
1259 This is not a phpMyAdmin problem but a Xitami known bug: you'll face
1260 it with each script/website that use forms.
1261 Upgrade or downgrade your Xitami server.
1263 [5.3] I have problems dumping tables with Konqueror (phpMyAdmin 2.2.2)
1264 With Konqueror 2.1.1: plain dumps, zip and gzip dumps work ok, except
1265 that the proposed file name for the dump is always 'tbl_dump.php'.
1266 Bzip2 dumps don't seem to work.
1267 With Konqueror 2.2.1: plain dumps work; zip dumps are placed into the
1268 user's temporary directory, so they must be moved before closing
1269 Konqueror, or else they disappear. Gzip dumps give an error message.
1270 Testing needs to be done for Konqueror 2.2.2.
1272 [5.4] I can't use the cookie authentication mode because Internet
1273 Explorer never stores the cookies.
1274 MS Internet Explorer seems to be really buggy about cookies, at least
1275 till version 6. And thanks to Andrew Zivolup we've traced also a php
1276 4.1.1 bug in this area!
1277 Then, if you're running php 4.1.1, try to upgrade or downgrade... it
1280 [5.5] In Internet Explorer 5.0, I get Javascript errors when browsing
1282 Upgrade to at least Internet Explorer 5.5SP2.
1284 [5.6] In Internet Explorer 5.0, 5.5 or 6.0, I get an error when trying
1285 to modify a row in a table with many fields, or with a text field.
1286 Your table neither have a primary key nor an unique one, so we must
1287 use a long URL to identify this row. There is a limit on the lenght of
1288 the URL in those browsers, and this not happen in Netscape, for
1289 example. The workaround is to create a primary or unique key, or use
1292 [5.7] I refresh (reload) my browser, and come back to the welcome
1294 Some browsers support right-clicking into the frame you want to
1295 refresh, just do this in the right frame.
1297 [5.8] With Mozilla 0.9.7 I have problems sending a query modified in
1299 Looks like a Mozilla bug: 0.9.6 was ok. We will keep an eye on future
1302 [5.9] With Mozilla 0.9.? to 1.0 and Netscape 7.0-PR1 I can't type a
1303 whitespace in the SQL-Query edit area: the page scrolls down.
1304 This is a Mozilla bug (see bug #26882 at Bugzilla).
1306 [5.10] With Netscape 4.75 I get empty rows between each row of data in
1307 a CSV exported file.
1308 This is a known Netscape 4.75 bug: it adds some line feeds when
1309 exporting data in octet-stream mode. Since we can't detect the
1310 specific Netscape version, we cannot workaround this bug.
1312 [6. Using phpMyAdmin]
1314 [6.1] I can't insert new rows into a table - MySQL brings up a
1316 Examine the SQL error with care. I've found that many programmers
1317 specifying a wrong field-type.
1318 Common errors include:
1319 * Using VARCHAR without a size argument
1320 * Using TEXT or BLOB with a size argument
1322 Also, look at the syntax chapter in the MySQL manual to confirm that
1323 your syntax is correct.
1325 [6.2] When I create a table, I click the Index checkbox for 2 fields
1326 and phpMyAdmin generates only one index with those 2 fields.
1327 In phpMyAdmin 2.2.0 and 2.2.1, this is the way to create a
1328 multi-fields index. If you want two indexes, create the first one when
1329 creating the table, save, then display the table properties and click
1330 the Index link to create the other index.
1332 [6.3] How can I insert a null value into my table?
1333 Since version 2.2.3, you have a checkbox for each field that can be
1334 null. Before 2.2.3, you had to enter "null", without the quotes, as
1337 [6.4] How can I backup my database or table?
1338 Click on a database or table name in the left frame, the properties
1339 will be displayed. Then on the menu, click "Export", you can dump the
1340 structure, the data, or both. This will generate standard SQL
1341 statements that can be used to recreate your database/table.
1342 You will need to choose "Save as file", so that phpMyAdmin can
1343 transmit the resulting dump to your station. Depending on your PHP
1344 configuration, you will see options to compress the dump. See also the
1345 $cfg['ExecTimeLimit'] configuration variable.
1346 For additional help on this subject, look for the word "dump" in this
1349 [6.5] How can I restore (upload) my database or table using a dump?
1350 How can I run a ".sql" file?
1351 Click on a database name in the left frame, the properties will be
1352 local displayed. Then in the "Run SQL query" section, type in your
1353 dump filename, or use the Browse button. Then click Go.
1354 For additional help on this subject, look for the word "upload" in
1357 [6.6] How can I use the relation table in Query-by-example?
1358 Here is an example with the tables persons, towns and countries, all
1359 located in the database mydb. If you don't have a PMA_relation table,
1360 create it as explained in the configuration section. Then create the
1362 CREATE TABLE REL_countries (
1363 country_code char(1) NOT NULL default '',
1364 description varchar(10) NOT NULL default '',
1365 PRIMARY KEY (country_code)
1367 INSERT INTO REL_countries VALUES ('C', 'Canada');
1368 CREATE TABLE REL_persons (
1369 id tinyint(4) NOT NULL auto_increment,
1370 person_name varchar(32) NOT NULL default '',
1371 town_code varchar(5) default '0',
1372 country_code char(1) NOT NULL default '',
1375 INSERT INTO REL_persons VALUES (11, 'Marc', 'S', '');
1376 INSERT INTO REL_persons VALUES (15, 'Paul', 'S', 'C');
1377 CREATE TABLE REL_towns (
1378 town_code varchar(5) NOT NULL default '0',
1379 description varchar(30) NOT NULL default '',
1380 PRIMARY KEY (town_code)
1382 INSERT INTO REL_towns VALUES ('S', 'Sherbrooke');
1383 INSERT INTO REL_towns VALUES ('M', 'Montréal');
1384 INSERT INTO `PMA_relation` VALUES ('mydb', 'REL_persons',
1385 'town_code', 'mydb', 'REL_towns', 'town_code');
1386 INSERT INTO `PMA_relation` VALUES ('mydb', 'REL_persons',
1387 'country_code', 'mydb', 'REL_countries', 'country_code');
1388 INSERT INTO `PMA_table_info` VALUES ('mydb', 'REL_towns',
1390 INSERT INTO `PMA_table_info` VALUES ('mydb', 'REL_countries',
1392 Then test like this:
1393 * Click on your db name in the left frame
1395 * Use tables: persons, towns, countries
1396 * Click "Update query"
1397 * In the fields row, choose persons.person_name and click the "Show"
1399 * Do the same for towns.description and countries.descriptions in
1401 * Click "Update query" and you will see in the query box that the
1402 correct joins have been generated
1403 * Click "Submit query"
1405 [6.7] How can I use the "display field" feature?
1406 Starting from the previous example, create the PMA_table_info as
1407 explained in the configuration section, then browse your persons
1408 table, and move the mouse over a town code or country code.
1410 [6.8] How can I produce a PDF schema of my database?
1411 First you have to fill the "relation", "table_coords" and "pdf_pages"
1412 configuration variables.
1413 Then, think about your schema layout: which tables will go on which
1415 * Click on your db name in the left frame
1416 * Choose "Structure" in the navigation on top
1417 * Choose "Edit PDF Pages" which should be somewhere at the bottom of
1419 * Enter the name for a first pdf page and submit
1420 * Choose this page to edit
1421 * Now add a table you want to show on this page and it's coordinates
1423 First you will have to guess this coordinates of course, so just
1424 expect to have an area of about 297 * 210 and put the tables
1425 coordinates somewhere in there, you will be able to have a look at
1426 what happened and change them later.
1427 For example, x=100 and y=200 means that the table will be at 200
1428 mm down and 100 mm right from the upper left corner.
1429 Actually if you have a width of more than 300 or a height of more
1430 than 200 than it will automatically be scaled but 300*100 is a
1431 good start to have an idea of what coordinates to use.
1432 * After every table you submitted you will have the possibility to
1434 * When you have entered enough tables Click on your db name in the
1436 * Now, again at the bottom of the page you should be able to choose
1437 "Display PDF schema"
1438 For testing it might be useful to show the grid as well, so you
1439 can see the coordinates used.
1440 Maybe also choose color and submit.
1441 * Save the file he will offer you to something like Schema.pdf
1442 (Internet Explorer has some bug there which might make it offer it
1443 without an extension. Under Windows it is important to have the
1444 extension ".pdf", under other OSes you should be fine just saving
1445 the file under the name it offers).
1447 [6.9] phpMyAdmin is changing the type of one of my columns!
1448 No, it's MySQL that is doing silent column type changing.
1450 [6.10] My database has an underscore in it's name, and when I grant
1451 privileges to a user for this database, a backslash is added before
1453 This is normal and means that the grant is done only for this
1454 database. If there was no backslash, this would be a wildcard grant,
1455 and the underscore would mean "any character". So, if the database
1456 name is "john_db", the user would get rights to john1db, john2db...
1457 instead of just john_db.
1458 If you really want to grant using a wildcard, there is a dialog box "
1459 Database (wildcards allowed)" for this.
1461 [6.11] What is the curious symbol ø in the table statistics?
1464 [6.12] I want to understand some Export options.
1465 "Complete inserts" adds the column names on every INSERT command, for
1466 better documentation (but resulting file is bigger).
1467 "Extended inserts" provides a shorter dump file by using only once the
1468 INSERT verb and the table name.
1469 "Enclose table and field names with backquotes" ensures that field and
1470 table names formed with special characters are protected.
1472 [6.13] I would like to create a database with a dot in its name.
1473 This is a bad idea, because in MySQL the syntax "database.table" is
1474 the normal way to reference a database and table name. Worse, MySQL
1475 will usually let you create a database with a dot, but then you cannot
1476 work with it, nor delete it.
1478 [6.14] How do I set up the SQL validator?
1479 To use it, you need a very recent version of PHP, built with Overload,
1480 XML and PEAR support. On your system command line, run "pear install
1481 Mail_Mime Net_DIME SOAP" to get the nessecary PEAR modules for usage.
1482 If you use it, you should be aware that any SQL statement you submit
1483 will be stored anonymously (database/table/column names, strings,
1484 numbers replaced with generic values). The Mimer SQL Validator itself,
1485 is © 2001 Upright Database Technology. We utilize it as free XML-SOAP
1487 The overload module is crucial to the functionality of the validator
1490 [6.15] I want to add a BLOB field and put an index on it, but MySQL
1491 says "BLOB column '...' used in key specification without a key
1493 The right way to do this, is to create the field without any indexes,
1494 then display the table structure and use the "Create an index" dialog.
1495 On this page, you will be able to choose your BLOB field, and set a
1496 size to the index, which is the condition to create an index on a BLOB
1499 [7. phpMyAdmin project]
1501 [7.1] I have found a bug. How do I inform developers?
1502 Our Bug Tracker is located at
1503 http://sourceforge.net/projects/phpmyadmin/ under the Bugs section.
1504 But please first discuss your bug with other users:
1505 http://sourceforge.net/projects/phpmyadmin/ (and choose Forums)
1507 [7.2] I want to translate the messages to a new language or upgrade an
1508 existing language, where do I start?
1509 Always use the current cvs version of your language file. For a new
1510 language, start from english-iso-8859-1.inc.php3. If you don't know
1511 how to get the cvs version, please ask one of the developers.
1512 Please note that we try not to use html entities like é in the
1513 translations, since we define the right character set in the file.
1514 With html entities, the text on buttons would not display correctly.
1515 You can then put your translations, as a zip file to avoid losing
1516 special characters, on the sourceforge.net translation tracker.
1517 It would be a good idea to subscribe to the phpmyadmin-translators
1518 mailing list, because this is where we ask for translations of new
1521 [7.3] I would like to help out with the development of phpMyAdmin. How
1523 The following method is preferred for new developers:
1524 * fetch the current CVS tree over anonymous CVS:
1526 -d:pserver:anonymous@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmy
1528 [Password: simply press the Enter key]
1530 -d:pserver:anonymous@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmy
1531 admin checkout phpMyAdmin
1532 [This will create a new sub-directory named phpMyAdmin]
1534 * put the modified files (tar'ed and gzip'ed) inside the patch
1535 tracker of the phpMyAdmin SourceForge account.
1537 Write access to the CVS tree is granted only to experienced developers
1538 who have already contributed something useful to phpMyAdmin.
1539 Also, have a look at the Developers section.
1540 ______________________________________________________________________
1542 Top - Requirements - Introduction - Installation -
1543 Configuration - FAQ - Developers - Credits
1544 ______________________________________________________________________
1546 Developers Information
1548 phpMyAdmin is Open Source, so you're invited to contribute to it. Many
1549 great features have been written by other people and you too can help
1550 to make phpMyAdmin a useful tool.
1552 If you're planning to contribute source, please read the following
1554 * All files include header.inc.php3 (layout),
1555 libraries/common.lib.php3 (common functions) and config.inc.php3.
1556 All configuration data belongs in config.inc.php3. Please keep it
1557 free from other code.
1558 Commonly used functions should be added to
1559 libraries/common.lib.php3 and more specific ones may be added
1560 within a library stored into the libraries sub-directory.
1561 * Obviously, you're free to use whatever coding style you want. But
1562 please try to keep your code as simple as possible: beginners are
1563 using phpMyAdmin as an example application.
1564 As far as possible, we want the scripts to be XHTML1.0 and CSS2
1565 compliant on one hand, they fit PEAR coding standards on the other
1566 hand. Please pay attention to this.
1567 * Please try to keep up the file-naming conventions. Table-related
1568 stuff goes to tbl_*.php3, db-related code to db_*.php3 and so on.
1569 * Please don't use verbose strings in your code, instead add the
1570 string (at least) to english-iso-8859-1.inc.php3 and print() it
1572 * If you want to be really helpful, write an entry for the
1575 IMPORTANT: With 1.4.1, development has switched to CVS. The following
1576 method is preferred for new developers:
1577 * fetch the current CVS tree over anonymous CVS:
1579 -d:pserver:anonymous@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmy
1581 [Password: simply press the Enter key]
1583 -d:pserver:anonymous@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmy
1584 admin checkout phpMyAdmin
1585 [This will create a new sub-directory named phpMyAdmin]
1587 * put the modified files (tar'ed and gzip'ed) inside the patch
1588 tracker of the phpMyAdmin SourceForge account
1589 (http://sourceforge.net/projects/phpmyadmin/)
1591 Write access to the CVS tree is granted only to developers who have
1592 already contributed something useful to phpMyAdmin. If you're
1593 interested in that, please contact us using the phpmyadmin-devel
1595 ______________________________________________________________________
1597 Top - Requirements - Introduction - Installation -
1598 Configuration - FAQ - Developers - Credits
1599 ______________________________________________________________________
1604 phpMyAdmin - Credits
1605 ====================
1607 CREDITS, in chronological order
1608 -------------------------------
1610 - Tobias Ratschiller <tobias.ratschiller_at_maguma.com>
1611 * creator of the phpmyadmin project
1612 * maintainer from 1998 to summer 2000
1614 - Marc Delisle <DelislMa_at_CollegeSherbrooke.qc.ca>
1615 * multi-language version
1616 * various fixes and improvements
1617 * project co-administrator
1619 - Olivier Müller <om_at_omnis.ch>
1620 * started SourceForge phpMyAdmin project in March 2001
1621 * sync'ed different existing CVS trees with new features and bugfixes
1622 * multi-language improvements, dynamic language selection
1623 * current project maintainer
1624 * many bugfixes and improvements
1626 - Loïc Chapeaux <lolo_at_phpheaven.net>
1627 * rewrote and optimized javascript, DHTML and DOM stuff
1628 * rewrote the scripts so they fit the PEAR coding standards and
1629 generate XHTML1.0 and CSS2 compliant codes
1630 * improved the language detection system
1631 * many bugfixes and improvements
1633 - Robin Johnson <robbat2_at_users.sourceforge.net>
1634 * database maintence controls
1636 * Host authentication IP Allow/Deny
1637 * DB-based configuration (Not completed)
1640 * many bugfixes and improvements
1642 - Armel Fauveau <armel.fauveau_at_globalis-ms.com>
1644 * multiple dump feature
1648 - Geert Lund <glund_at_silversoft.dk>
1650 * moderator of the phpMyAdmin users forum at phpwizard.net
1652 - Korakot Chaovavanich <korakot_at_iname.com>
1653 * "insert as new row" feature
1655 - Pete Kelly <webmaster_at_trafficg.com>
1656 * rewrote and fix dump code
1659 - Steve Alberty <alberty_at_neptunlabs.de>
1660 * rewrote dump code for PHP4
1661 * mySQL table statistics
1664 - Benjamin Gandon <gandon_at_isia.cma.fr>
1665 * main author of the version 2.1.0.1
1668 - Alexander M. Turek <rabus_at_bugfixes.info>
1670 * MySQL 4 related features
1671 * various small features and fixes
1672 * German language file updates
1674 - Mike Beck <mike.beck_at_ibmiller.de>
1675 * automatic joins in QBE
1676 * links column in printview
1679 - Michal Cihar <nijel_at_users.sourceforge.net>
1680 * enhanced index creation/display feature
1681 * feature to use a different charset for HTML than for MySQL
1682 * Czech language file updates
1684 - Christophe Gesché from the "MySQL Form Generator for PHPMyAdmin"
1685 (http://sourceforge.net/projects/phpmysqlformgen/)
1686 * suggested the patch for multiple table printviews
1688 - Garvin Hicking <hicking_at_faktor-e.de>
1689 * built the patch for vertical display of table rows
1691 - Yukihiro Kawada <kawada_at_den.fujifilm.co.jp>
1692 * japanese kanji encoding conversion feature
1694 - Piotr Roszatycki <d3xter_at_users.sourceforge.net> and Dan Wilson
1695 * the Cookie authentication mode
1697 - Axel Sander <n8falke_at_users.sourceforge.net>
1698 * table relation-links feature
1700 - Maxime Delorme <delorme.maxime_at_free.fr>
1701 * PDF schema output, thanks also to Olivier Plathey for the
1702 "FPDF" library (see http://www.fpdf.org/).
1704 - Olof Edlund <olof.edlund_at_upright.se>
1705 * SQL validator server
1707 - Ivan R. Lanin <ivanlanin_at_users.sourceforfe.net>
1710 And also to the following people who have contributed minor changes,
1711 enhancements, bugfixes or support for a new language since version 2.1.0:
1713 Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita,
1714 Péter Bakondy, Borges Botelho, Olivier Bussier, Neil Darlow,
1715 Laurent Dhima, Kristof Hamann, Thomas Kläger, Lubos Klokner,
1716 Martin Marconcini, Girish Nair, David Nordenberg, Andreas Pauley,
1717 Bernard M. Piller, Laurent Haas, "Sakamoto", Yuval Sarna,
1718 www.securereality.com.au, Alvar Soome, Siu Sun, Peter Svec, Michael Tacelosky,
1719 Rachim Tamsjadi, Kositer Uros, Luís V., Martijn W. van der Lee,
1720 Algis Vainauskas, Daniel Villanueva, Vinay, Ignacio Vazquez-Abrams, Chee Wai,
1721 Jakub Wilk, Thomas Michael Winningham, Vilius Zigmantas.
1724 Original Credits of Version 2.1.0
1725 ---------------------------------
1727 This work is based on Peter Kuppelwieser's MySQL-Webadmin. It was his idea
1728 to create a web-based interface to MySQL using PHP3. Although I have not
1729 used any of his source-code, there are some concepts I've borrowed from
1730 him. phpMyAdmin was created because Peter told me he wasn't going to
1731 further develop his (great) tool.
1733 - Amalesh Kempf <ak-lsml_at_living-source.com> who contributed the
1734 code for the check when dropping a table or database. He also suggested
1735 that you should be able to specify the primary key on tbl_create.php3. To
1736 version 1.1.1 he contributed the ldi_*.php3-set (Import text-files) as
1737 well as a bug-report. Plus many smaller improvements.
1738 - Jan Legenhausen <jan_at_nrw.net>: He made many of the changes that
1739 were introduced in 1.3.0 (including quite significant ones like the
1740 authentication). For 1.4.1 he enhanced the table-dump feature. Plus
1742 - Marc Delisle <DelislMa_at_CollegeSherbrooke.qc.ca> made phpMyAdmin
1743 language-independent by outsourcing the strings to a separate file. He
1744 also contributed the French translation.
1745 - Alexandr Bravo <abravo_at_hq.admiral.ru> who contributed
1746 tbl_select.php3, a feature to display only some fields from a table.
1747 - Chris Jackson <chrisj_at_ctel.net> added support for MySQL
1748 functions in tbl_change.php3. He also added the
1749 "Query by Example" feature in 2.0.
1750 - Dave Walton <walton_at_nordicdms.com> added support for multiple
1751 servers and is a regular contributor for bug-fixes.
1752 - Gabriel Ash <ga244_at_is8.nyu.edu> contributed the random access
1754 The following people have contributed minor changes, enhancements, bugfixes
1755 or support for a new language:
1756 Jim Kraai, Jordi Bruguera, Miquel Obrador, Geert Lund, Thomas Kleemann,
1757 Alexander Leidinger, Kiko Albiol, Daniel C. Chao, Pavel Piankov,
1758 Sascha Kettler, Joe Pruett, Renato Lins, Mark Kronsbein, Jannis Hermanns,
1761 And thanks to everyone else who sent me email with suggestions, bug-reports
1762 and or just some feedback.
1763 ______________________________________________________________________
1765 Top - Requirements - Introduction - Installation -
1766 Configuration - FAQ - Developers - Credits
1767 ______________________________________________________________________
1769 Valid XHTML 1.0! Valid CSS!