安装和配置phpMyAdmin 详解

安装和配置phpMyAdmin

去phpMyAdmin的官方网站:http://www.phpmyadmin.net/

找到下载地址:http://www.phpmyadmin.net/home_page/downloads.php

找到phpMyAdmin2.11.3选项,点击下载phpMyAdmin-2.11.3-all-languages.zip

然后解压后到Apache服务器的网站默认根目录中,我的则是放在:D:\PHPweb\Apache2.2\htdocs下,

找到/libraries/config.default.php文件。

(注意:这里和旧版本不一样,旧版本是根目录下的config.inc.php文件)

用写字板或其他编辑软件进行编辑。

(注意:这里不要用记事本,这是UTF8编码)

查找:

$cfg['PmaAbsoluteUri']

这里设置你的phpmyadmin的URL。

如:$cfg['PmaAbsoluteUri']='http://localhost:8080/phpmyadmin/';

$cfg['Servers'][$i]['host']

这里可以设定远程MySQL服务器IP地址,一般可以不用修改。

如:$cfg['Servers'][$i]['host']='localhost';

$cfg['Servers'][$i]['auth_type']

连接MySQL服务器的方式,这里建议使用cookie。

如:$cfg['Servers'][$i]['auth_type']='cookie';

$cfg['blowfish_secret']

如果你的“$cfg['Servers'][$i]['auth_type']='cookie'的话。这里不填的话,phpMyAdmin会出现“配置文件现在需要绝密的短语密码(blowfish_secret)”,那么请在这里随便填写一个字符串。

如:$cfg['blowfish_secret']='mimang.net';

$cfg['Servers'][$i]['user']

这里设置你的MySQLMySQL连接帐号。

如:$cfg['Servers'][$i]['user']='root';

$cfg['Servers'][$i]['password']

这里设置你的MySQL连接密码。

$cfg['Servers'][$i]['only_db']

你只有一个数据库就设置下,设置为你的数据库名;如果你想架设服务器,那么建议留空。

如:$cfg['Servers'][$i]['only_db']='';

$cfg['DefaultLang']

这里是选择语言,zh代表简体中文的意思。

如:cfg['DefaultLang']='zh';

设置完毕后保存,然后打开http://localhost:8080/phpmyadmin/测试一下。

还有一个地方需要注意下:

如果运行PHPMYADMIN后出现下面这个错误:

“没有发现PHP的扩展设置mbstring,而当前系统好像在使用宽字符集。没有mbstring扩展的phpMyAdmin不能正确识别字符串,可能产生不可意料的结果。”

解决方法:找到你的PHP.INI文件。查找:extension=php_mbstring.dll

把前面的;去掉!重新启动Apache,就OK了!

附录:PHPMyadmin配置文件config.inc.php详解,在需要设置的地方增加了相关注释。

<?php

/*$Id:config.inc.php,v1.204.2.12003/10/1014:24:24nijelExp$*/

// vim: expandtab sw=4 ts=4 sts=4:

/**

*phpMyAdminConfigurationFile

*

*AlldirectivesareexplainedinDocumentation.html

*/

/**

*Setsthephperrorreporting-Pleasedonotchangethisline!

*/

if(!isset($old_error_reporting)){

error_reporting(E_ALL);

@ini_set('display_errors','1');

}

/**

*YourphpMyAdminurl

*

*Completethevariablebelowwiththefullurlie

*http://www.your_web.net/path_to_your_phpMyAdmin_directory/

*

*ItmustcontaincharactersthatarevalidforaURL,andthepathis

*casesensitiveonsomeWebservers,forexampleUnix-basedservers.

*

*Inmostcasesyoucanleavethisvariableempty,asthecorrectvalue

*willbedetectedautomatically.However,werecommendthatyoudo

*testtoseethattheauto-detectioncodeworksinyoursystem.Agood

*testistobrowseatable,theneditarowandsaveit.Therewillbe

*anerrormessageifphpMyAdmincannotauto-detectthecorrectvalue.

*

*Iftheauto-detectioncodedoesworkproperly,youcansettoTRUEthe

*$cfg['PmaAbsoluteUri_DisableWarning']variablebelow.

*/

$cfg['PmaAbsoluteUri'] = '';-----这里设置你的phpmyadmin的URL,如:http://localhost/phpmyadmin/

/**

*Disablethedefaultwarningabout$cfg['PmaAbsoluteUri']notbeingset

*YoushouldusethisifandONLYifthePmaAbsoluteUriauto-detection

*worksperfectly.

*/

$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;

/**

*DisablethedefaultwarningthatisdisplayedontheDBDetailsStructurepageif

*anyoftherequiredTablesfortherelationfeaturescouldnotbefound

*/

$cfg['PmaNoRelation_DisableWarning']  = FALSE;

/**

*The'cookie'auth_typeusesblowfishalgorithmtoencryptthepassword.If

*atleastoneserverconfigurationuses'cookie'auth_type,enterherea

*passphrasethatwillbeusedbyblowfish.

$cfg['blowfish_secret'] = '';-----设定好root密码后这里也要填写

/**

*Server(s)configuration

*/

$i=0;

//The$cfg['Servers']arraystartswith$cfg['Servers'][1].Donotuse$cfg['Servers'][0].

//Youcandisableaserverconfigentrybysettinghostto''.

$i++;

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address----这里可以设定远程MySQL服务器IP地址

$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port-----默认为3306

$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket

$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')-----连接MySQL服务器的方式

$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection                                                    // (requires PHP >= 4.3.0)-----是否使用压缩协议,PHP版本须>= 4.3.0

$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings

//(thisusermusthaveread-only

$cfg['Servers'][$i]['controlpass']='';//accesstothe"mysql/user"

                                                    // and "mysql/db" tables)-----MySQL控制用户设定,该用户只对mysql数据库下的user和db表有完全权限

$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?-----如果PHP安装模式为Apache,可以使用http和cookie;如果PHP安装模式为CGI,可以使用cookie;默认为config,是不安全的,不推荐。

$cfg['Servers'][$i]['user']          = 'root';      // MySQL user-----MySQL连接用户

$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed with 'config' auth_type)-----MySQL连接密码,建议在安装好PHP和MySQL后,先用phpmyadmin设定root密码,然后在这里填写

$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only

//thisdbisdisplayed

//atleftframe

//Itmayalsobeanarray

                                                    // of db-names-----如果在这里设定一个数据库的名字,那么登陆后框架左边将只显示这个数据库

$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features

//(seescripts/create_tables.sql)

//-leaveblankfornosupport

//DEFAULT:'phpmyadmin'

$cfg['Servers'][$i]['bookmarktable']='';//Bookmarktable

//-leaveblankfornobookmarksupport

//DEFAULT:'pma_bookmark'

$cfg['Servers'][$i]['relation']='';//tabletodescribetherelationbetweenlinks(seedoc)

//-leaveblankfornorelation-linkssupport

//DEFAULT:'pma_relation'

$cfg['Servers'][$i]['table_info']='';//tabletodescribethedisplayfields

//-leaveblankfornodisplayfieldssupport

//DEFAULT:'pma_table_info'

$cfg['Servers'][$i]['table_coords']='';//tabletodescribethetablespositionforthePDFschema

//-leaveblankfornoPDFschemasupport

//DEFAULT:'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']='';//tabletodescribepagesofrelationpdf

//-leaveblankifyoudon'twanttousethis

//DEFAULT:'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']='';//tabletostorecolumninformation

//-leaveblankfornocolumncomments/mimetypes

//DEFAULT:'pma_column_info'

$cfg['Servers'][$i]['history']='';//tabletostoreSQLhistory

//-leaveblankfornoSQLqueryhistory

//DEFAULT:'pma_history'

$cfg['Servers'][$i]['verbose_check']=TRUE;//settoFALSEifyouknowthatyourpma_*tables

//areuptodate.Thispreventscompatibility

//checksandtherebyincreasesperformance.

$cfg['Servers'][$i]['AllowDeny']['order']//Hostauthenticationorder,leaveblanktonotuse

='';

$cfg['Servers'][$i]['AllowDeny']['rules']//Hostauthenticationrules,leaveblankfordefaults

                                     = array();

$i++;

$cfg['Servers'][$i]['host']='';

$cfg['Servers'][$i]['port']='';

$cfg['Servers'][$i]['socket']='';

$cfg['Servers'][$i]['connect_type']='tcp';

$cfg['Servers'][$i]['compress']=FALSE;

$cfg['Servers'][$i]['controluser']='';

$cfg['Servers'][$i]['controlpass']='';

$cfg['Servers'][$i]['auth_type']='config';

$cfg['Servers'][$i]['user']='root';

$cfg['Servers'][$i]['password']='';

$cfg['Servers'][$i]['only_db']='';

$cfg['Servers'][$i]['verbose']='';

$cfg['Servers'][$i]['pmadb']='';//'phpmyadmin'-seescripts/create_tables.sql

$cfg['Servers'][$i]['bookmarktable']='';//'pma_bookmark'

$cfg['Servers'][$i]['relation']='';//'pma_relation'

$cfg['Servers'][$i]['table_info']='';//'pma_table_info'

$cfg['Servers'][$i]['table_coords']='';//'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']='';//'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']='';//'pma_column_info'

$cfg['Servers'][$i]['history']='';//'pma_history'

$cfg['Servers'][$i]['verbose_check']=TRUE;

$cfg['Servers'][$i]['AllowDeny']['order']

='';

$cfg['Servers'][$i]['AllowDeny']['rules']

                                       = array();

$i++;

$cfg['Servers'][$i]['host']='';

$cfg['Servers'][$i]['port']='';

$cfg['Servers'][$i]['socket']='';

$cfg['Servers'][$i]['connect_type']='tcp';

$cfg['Servers'][$i]['compress']=FALSE;

$cfg['Servers'][$i]['controluser']='';

$cfg['Servers'][$i]['controlpass']='';

$cfg['Servers'][$i]['auth_type']='config';

$cfg['Servers'][$i]['user']='root';

$cfg['Servers'][$i]['password']='';

$cfg['Servers'][$i]['only_db']='';

$cfg['Servers'][$i]['verbose']='';

$cfg['Servers'][$i]['pmadb']='';//'phpmyadmin'-seescripts/create_tables.sql

$cfg['Servers'][$i]['bookmarktable']='';//'pma_bookmark'

$cfg['Servers'][$i]['relation']='';//'pma_relation'

$cfg['Servers'][$i]['table_info']='';//'pma_table_info'

$cfg['Servers'][$i]['table_coords']='';//'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']='';//'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']='';//'pma_column_info'

$cfg['Servers'][$i]['history']='';//'pma_history'

$cfg['Servers'][$i]['verbose_check']=TRUE;

$cfg['Servers'][$i]['AllowDeny']['order']

='';

$cfg['Servers'][$i]['AllowDeny']['rules']

                                       = array();

// If you have more than one server configured, you can set $cfg['ServerDefault']

//toanyoneofthemtoautoconnecttothatserverwhenphpMyAdminisstarted,

//orsetitto0tobegivenalistofserverswithoutloggingin

//Ifyouhaveonlyoneserverconfigured,$cfg['ServerDefault']*MUST*be

//settothatserver.[color]=red]-----是否显示所有的MySQL服务器

$cfg['ServerDefault']=1;//Defaultserver(0=nodefaultserver)

$cfg['Server']='';

unset($cfg['Servers'][0]);

/**

*OthercorephpMyAdminsettings

*/

$cfg['OBGzip']                  = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto')-----有必要的话是否使用GZIP输出缓冲

$cfg['PersistentConnections']   = FALSE;  // use persistent connections to MySQL database-----是否使用MySQL持久连接,即pconnect

$cfg['ExecTimeLimit']           = 300;    // maximum execution time in seconds (0 for no limit)-----最大脚本执行时间,单位:秒

$cfg['SkipLockedTables']        = FALSE;  // mark used tables, make possible to show

//lockedtables(sinceMySQL3.23.30)

$cfg['ShowSQL']                 = TRUE;   // show SQL queries as run-----运行查询时显示SQL查询语句

$cfg['AllowUserDropDatabase']   = FALSE;  // show a 'Drop database' link to normal users-----是否对普通用户显示“删除数据库”连接

$cfg['Confirm']                 = TRUE;   // confirm 'Drop TABLE' & 'Drop DATABASE'-----删除数据表/库前是否出现确认提示框

$cfg['LoginCookieRecall']       = TRUE;   // recall previous login in cookie auth. mode or not-----是否收回先前cookie认证模式的cookie

$cfg['UseDbSearch']             = TRUE;   // whether to enable the "database search" feature

//ornot

$cfg['IgnoreMultiSubmitErrors']=FALSE;//ifsettotrue,PMAcontinuescomputingmultiple-statementqueries

//evenifoneofthequeriesfailed

$cfg['VerboseMultiSubmit']=TRUE;//ifsettotrue,PMAwillshowtheaffectedrowsofEACHstatementon

//multiple-statementqueries.Seetheread_dump.phpfileforhardcoded

//defaultsonhowmanyqueriesastatementmaycontain!

$cfg['AllowArbitraryServer']    = FALSE;  // allow login to any user entered server in cookie based auth

// Left frame setup-----左侧框架设置

$cfg['LeftFrameLight']=TRUE;.-----是否使用下拉框显示当前数据库//useaselect-basedmenuanddisplayonlythe

//currenttablesintheleftframe

$cfg['LeftFrameTableSeparator']='__';//Whichstringwillbeusedtogeneratetableprefixes

//tosplittablesintomultiplecategories

$cfg['LeftFrameTableLevel']='1';//Howmanysublevelsshouldbedisplayedwhensplitting

                                        // up tables by the above Separator

$cfg['ShowTooltip']           = TRUE;   // display table comment as tooltip in left frame-----是否在框架左侧显示数据表内容提示

$cfg['ShowTooltipAliasDB']    = FALSE;  // if ShowToolTip is enabled, this defines that table/db comments

$cfg['ShowTooltipAliasTB']    = FALSE;  // are shown (in the left menu and db_details_structure) instead of                                        // table/db names

$cfg['LeftDisplayLogo']       = TRUE;   // display logo at top of left frame-----是否在框架左侧显示phpmyadmin的logo

$cfg['LeftDisplayServers']    = FALSE;  // display server choice at top of left frame-----是否显示MySQL服务器选择选项

// In the main frame, at startup...-----右侧主框架设置(刚进入时)

$cfg['ShowStats']=TRUE;//allowtodisplaystatisticsandspaceusagein

//thepagesaboutdatabasedetailsandtable

//properties

$cfg['ShowMysqlInfo']=FALSE;-----是否显示MySQL运行时间//whethertodisplaythe"MySQLruntime

$cfg['ShowMysqlVars']=FALSE;-----是否显示MySQL系统变量//information","MySQLsystemvariables","PHP

$cfg['ShowPhpInfo']=FALSE;-----是否显示PHP信息//information"and"changepassword"linksfor

$cfg['ShowChgPassword']=FALSE;-----修改密码选项//simpleusersornot

$cfg['SuggestDBName']       = TRUE;   -----是否显示要建立的数据库默认名字// suggest a new DB name if possible (false = keep empty)

// In browse mode...

$cfg['ShowBlob']=FALSE;//displayblobfieldcontents

$cfg['NavigationBarIconic']=TRUE;//donotdisplaytextinsidenavigationbarbuttons

$cfg['ShowAll']=FALSE;//allowstodisplayalltherows-----是否显示所有数据表行

$cfg['MaxRows']=30;//maximumnumberofrowstodisplay-----数据表行每页显示的数量

$cfg['Order']='ASC';//defaultfor'ORDERBY'clause(valid

//valuesare'ASC','DESC'or'SMART'-ie

//descendingorderforfieldsoftype

//TIME,DATE,DATETIME&TIMESTAMP,

                                        // ascending order else-)

// In edit mode...

$cfg['ProtectBinary']='blob';//disalloweditingofbinaryfields

//validvaluesare:

//FALSEallowediting

//'blob'alloweditingexceptforBLOBfields

//'all'disallowediting

$cfg['ShowFunctionFields']=TRUE;//Displaythefunctionfieldsinedit/insertmode

$cfg['CharEditing']='input';

//WhicheditorshouldbeusedforCHAR/VARCHARfields:

//input-allowslimitingofinputlength

                                        //  textarea - allows newlines in fields

// For the export features...

$cfg['ZipDump']=TRUE;//Allowtheuseofzip/gzip/bzip

$cfg['GZipDump']=TRUE;//compressionfor

$cfg['BZipDump']=TRUE;//dumpfiles

$cfg['CompressOnFly']=TRUE;//Willcompressgzip/bzip2exportson

//flywithoutneedformuchmemory.

//Ifyouencounterproblemswith

//createdgzip/bzip2filesdisable

                                        // this feature.

// Tabs display settings

$cfg['LightTabs']=FALSE;//usegraphicallylessintensemenutabs

$cfg['PropertiesIconic']=TRUE;//Useiconsinsteadoftextforthetabledisplayofadatabase(TRUE|FALSE|'both')

$cfg['PropertiesNumColumns']=1;//Howmanycolumnsshouldbeusedfortabledisplayofadatabase?

                                        // (a value larger than 1 results in some information being hidden)

$cfg['DefaultTabServer']      = 'main.php';

//Possiblevalues:

//'main.php'=thewelcomepage

//(recommendedformultiusersetups)

//'server_databases.php'=listofdatabases

//'server_status.php'=runtimeinformation

//'server_variables.php'=MySQLservervariables

//'server_privileges.php'=usermanagement

//'server_processlist.php'=processlist

$cfg['DefaultTabDatabase']='db_details_structure.php';

//Possiblevalues:

//'db_details_structure.php'=tableslist

//'db_details.php'=sqlform

//'db_search.php'=searchquery

$cfg['DefaultTabTable']='tbl_properties_structure.php';

//Possiblevalues:

//'tbl_properties_structure.php'=fieldslist

//'tbl_properties.php'=sqlform

//'tbl_select.php=selectpage

                                   // 'tbl_change.php = insert row page

/**

*Exportdefaults

*/

$cfg['Export']['format']                    = 'sql';  // sql/latex/excel/csv/xml-----导出文件的格式$cfg['Export']['compression']               = 'none'; // none/zip/gzip/bzip2-----导出文件是否压缩

$cfg['Export']['asfile']                    = FALSE;----是否导出为文件

$cfg['Export']['onserver']=FALSE;-----导出到服务器

$cfg['Export']['onserver_overwrite']=FALSE;-----是否使用导出覆盖

$cfg['Export']['remember_file_template']    = TRUE;-----记住文件模板

$cfg['Export']['csv_columns']               = FALSE;

$cfg['Export']['csv_null']='NULL';

$cfg['Export']['csv_separator']=';';

$cfg['Export']['csv_enclosed']='&quot;';

$cfg['Export']['csv_escaped']='\\';

$cfg['Export']['csv_terminated']='AUTO';

$cfg['Export']['excel_columns']=FALSE;

$cfg['Export']['excel_null']                = 'NULL';

$cfg['Export']['latex_structure']           = TRUE;

$cfg['Export']['latex_data']=TRUE;

$cfg['Export']['latex_columns']=TRUE;

$cfg['Export']['latex_relation']=TRUE;

$cfg['Export']['latex_comments']=TRUE;

$cfg['Export']['latex_mime']=TRUE;

$cfg['Export']['latex_null']='\textit{NULL}';

$cfg['Export']['latex_caption']=TRUE;

$cfg['Export']['latex_data_label']='tab:__TABLE__-data';

$cfg['Export']['latex_structure_label']     = 'tab:__TABLE__-structure';

$cfg['Export']['sql_structure']             = TRUE;

$cfg['Export']['sql_data']=TRUE;

$cfg['Export']['sql_drop_database']=FALSE;

$cfg['Export']['sql_drop_table']=FALSE;

$cfg['Export']['sql_auto_increment']=TRUE;

$cfg['Export']['sql_backquotes']=TRUE;

$cfg['Export']['sql_relation']=FALSE;

$cfg['Export']['sql_columns']=FALSE;

$cfg['Export']['sql_extended']=FALSE;

$cfg['Export']['sql_comments']=FALSE;

$cfg['Export']['sql_mime']                  = FALSE;

/**

*LinktotheofficialMySQLdocumentation.

*Besuretoincludenotrailingslashonthepath.

*Seehttp://www.mysql.com/documentation/index.htmlformoreinformation

*aboutMySQLmanualsandtheirtypes.

*/

$cfg['MySQLManualBase'] = 'http://www.mysql.com/doc/en';-----MySQL在线手册地址

/**

*TypeofMySQLdocumentation:

*old-oldstyleusedinphpMyAdmin2.3.0andsooner

*searchable-"Searchable,withusercomments"

*chapters-"HTML,onepageperchapter"

*big-"HTML,allononepage"

*none-donotshowdocumentationlinks

*/

$cfg['MySQLManualType'] = 'searchable';

/**

*PDFoptions

*/

$cfg['PDFPageSizes']=array('A3','A4','A5','letter','legal');

$cfg['PDFDefaultPageSize']  = 'A4';-----PDF页默认大小

/**

*Languageandcharsetconversionsettings

*/

//Defaultlanguagetouse,ifnotbrowser-definedoruser-defined

$cfg['DefaultLang'] = 'en-iso-8859-1';-----如果想使phpmyadmin直接显示中文,这里填:zh

// Force: always use this language - must be defined in

//libraries/select_lang.lib.php

//$cfg['Lang']='en-iso-8859-1';

//DefaultcharsettouseforrecodingofMySQLqueries,doesnottake

//anyeffectwhencharsetsrecodingisswitchedoffby

//$cfg['AllowAnywhereRecoding']orinlanguagefile

//(see$cfg['AvailableCharsets']topossiblechoices,youcanaddyourown)

$cfg['DefaultCharset'] = 'iso-8859-1';-----默认的phpmyadmin语言,可设置为:gb2312

//AllowcharsetrecodingofMySQLqueries,mustbealsoenabledinlanguage

//filetomakeharderusingotherlanguagefilesthanunicode.

//DefaultvalueisFALSEtoavoidproblemsonserverswithouttheiconv

//extensionandwheredl()isnotsupported

$cfg['AllowAnywhereRecoding'] = FALSE;

// You can select here which functions will be used for charset conversion.

//Possiblevaluesare:

//auto-automaticallyuseavailableone(firstistestediconv,then

//recode)

//iconv-useiconvorlibiconvfunctions

//recode-userecode_stringfunction

$cfg['RecodingEngine'] = 'auto';

// Specify some parameters for iconv used in charset conversion. See iconv

//documentationfordetails:

//http://www.gnu.org/software/libi...v/iconv_open.3.html

$cfg['IconvExtraParams'] = '';

// Available charsets for MySQL conversion. currently contains all which could

//befoundinlang/*filesandfewmore.

//Charsetswillbeshowninsameorderasherelisted,soifyoufrequently

//usesomeofthesemovethemtothetop.

$cfg['AvailableCharsets']=array(

'iso-8859-1',

'iso-8859-2',

'iso-8859-3',

'iso-8859-4',

'iso-8859-5',

'iso-8859-6',

'iso-8859-7',

'iso-8859-8',

'iso-8859-9',

'iso-8859-10',

'iso-8859-11',

'iso-8859-12',

'iso-8859-13',

'iso-8859-14',

'iso-8859-15',

'windows-1250',

'windows-1251',

'windows-1252',

'windows-1257',

'koi8-r',

'big5',

'gb2312',

'utf-8',,

'utf-7',

'x-user-defined',

'euc-jp',

'ks_c_5601-1987',

'tis-620',

'SHIFT_JIS'

);

// Loads language filerequire('./libraries/select_lang.lib.php');

/**

*Customization&design-----页面格式设定,以内容较多,可自行根据注释详细设定,这里给出部分注释

*/

$cfg['LeftWidth']           = 150;          // left frame width-----左侧框架宽度

$cfg['LeftBgColor']         = '#D0DCE0';    // background color for the left frame-----框架左侧的背景颜色

$cfg['RightBgColor']        = '#F5F5F5';    // background color for the right frame-----框架右侧的背景颜色

$cfg['RightBgImage']        = '';           // path to a background image for the right frame-----框架右侧的背景图片地址,不使用背景图片请留空

//(leaveblankfornobackgroundimage)

$cfg['LeftPointerColor']='#CCFFCC';//colorofthepointerinleftframe

//(blankfornopointer)-----框架左侧的指向点颜色

$cfg['Border']=0;//borderwidthontables-----表格宽度

$cfg['ThBgcolor']='#D3DCE3';//tableheaderrowcolour-----表格头颜色

$cfg['BgcolorOne']='#CCCCCC';//tabledatarowcolour-----表格中数据所在行的颜色

$cfg['BgcolorTwo']='#DDDDDD';//tabledatarowcolour,alternate-----表格中数据所在行的交替颜色

$cfg['BrowsePointerColor']='#CCFFCC';//colorofthepointerinbrowsemode

//(blankfornopointer)

$cfg['BrowseMarkerColor']='#FFCC99';//colorofthemarker(visuallymarksrow

//byclickingonit)inbrowsemode

//(blankfornomarker)

$cfg['TextareaCols']=40;//textareasize(columns)ineditmode

//(thisvaluewillbeemphasized(*2)forsql

//querytextareasand(*1.25)forquerywindow)

$cfg['TextareaRows']=7;//textareasize(rows)ineditmode

$cfg['LongtextDoubleTextarea']=TRUE;//doublesizeoftextareasizeforlongtextfields

$cfg['TextareaAutoSelect']=TRUE;//autoselectwhenclickinginthetextareaofthequerybox

$cfg['CharTextareaCols']=40;//textareasize(columns)forCHAR/VARCHAR

$cfg['CharTextareaRows']=2;//textareasize(rows)forCHAR/VARCHAR

$cfg['CtrlArrowsMoving']=TRUE;//EnableCtrl+Arrowsmovingbetweenfieldswhenediting?

$cfg['LimitChars']=50;//Maxfielddatalengthinbrowsemodeforallnon-numericfields

$cfg['ModifyDeleteAtLeft']=TRUE;//showedit/deletelinksonleftsideofbrowse

//(oratthetopwithverticalbrowse)

$cfg['ModifyDeleteAtRight']=FALSE;//showedit/deletelinksonrightsideofbrowse

//(oratthebottomwithverticalbrowse)

$cfg['DefaultDisplay']='horizontal';//defaultdisplaydirection

//(horizontal|vertical|horizontalflipped)

$cfg['DefaultPropDisplay']='horizontal';//defaultdisplaydirectionforaltering/

//creatingcolumns(tbl_properties)

                                            // (horizontal|vertical)

$cfg['HeaderFlipType']      = 'css';        // table-header rotation via faking or css? (css|fake)

//NOTE:CSSonlyworksinIEbrowsers!

$cfg['ShowBrowseComments']=TRUE;//showsstoredrelation-commentsin'browse'mode.

$cfg['ShowPropertyComments']=TRUE;//showsstoredrelation-commentsin'tableproperty'mode.

$cfg['RepeatCells']         = 100;          // repeat header names every X cells? (0 = deactivate)

$cfg['QueryFrame']          = TRUE;         // displays a new frame where a link to a querybox is always displayed.

$cfg['QueryFrameJS']=TRUE;//whethertousejavascriptfunctionsforopeninganewwindowforSQLcommands.

//ifsetto'false',thetargetofthequeryboxisalwaystherightframe.

$cfg['QueryFrameDebug']=FALSE;//displayJSdebugginglink(DEVELOPERSonly)

$cfg['QueryWindowWidth']=550;//WidthofQuerywindow

$cfg['QueryWindowHeight']=310;//HeightofQuerywindow

$cfg['QueryHistoryDB']=FALSE;//SettoTRUEifyouwantDB-basedqueryhistory.

//IfFALSE,thisutilizesJS-routinestodisplay

//queryhistory(lostbywindowclose)

$cfg['QueryWindowDefTab']='sql';//whichtabtodisplayinthequerywindowonstartup

//(sql|files|history|full)

$cfg['QueryHistoryMax']=25;//WhenusingDB-basedqueryhistory,howmanyentries

//shouldbekept?

$cfg['BrowseMIME']=TRUE;//UseMIME-Types(storedincolumncommentstable)for

$cfg['MaxExactCount']=20000;//Whenapproximatecount<this,PMAwillgetexactcountfor

//tablerows.

$cfg['WYSIWYG-PDF']=TRUE;//UtilizeDHTML/JScapabilitiestoallowWYSIWYGeditingof

                                            // the PDF page editor. Requires an IE6/Mozilla based browser.

/**

*SQLQueryboxsettings

*ThesearethelinksdisplayinalloftheSQLQueryboxes

*/

$cfg['SQLQuery']['Edit']=TRUE;//Editlinktochangeaquery

$cfg['SQLQuery']['Explain']=TRUE;//EXPLAINonSelectqueries

$cfg['SQLQuery']['ShowAsPHP']=TRUE;//WrapaqueryinPHP

$cfg['SQLQuery']['Validate']  = FALSE;      // Validate a query (see $cfg['SQLValidator'] as well)

/**

*Webserverupload/save/importdirectories

*/

$cfg['UploadDir']='';//Directoryforuploadedfilesthatcanbeexecutedby

//phpMyAdmin.Forexample'./upload'.Leaveemptyfor

//nouploaddirectorysupport

$cfg['SaveDir']='';//DirectorywherephpMyAdmincansaveexporteddataon

//server.Forexample'./save'.Leaveemptyfornosave

//directorysupport.

$cfg['docSQLDir']='';//DirectoryfordocSQLimports,phpMyAdmincanimport

//docSQLfilesfromthatdirectory.Forexample

                                            // './docSQL'. Leave empty for no docSQL import support.

/**

*Misc.settings

*/

$cfg['GD2Available']='auto';//IsGD>=2available?Settoyes/no/auto.'auto'

//doesautodetection,whichisabitexpensivefor

//php<4.3.0,butitistheonlysafevayhowto

//determineGDversion.

/**

*SQLParserSettings

*/

]$cfg['SQP']['fmtType']='html';//查询语句输出样式(html,text,none)

$cfg['SQP']['fmtInd']='1';//每行间距(floatsok)

$cfg['SQP']['fmtIndUnit']='em';//每行的缩进单位(CSSTypes-{em,px,pt})

$cfg['SQP']['fmtColor']=array(//语法颜色数据

'comment'=>'#808000',

'comment_mysql'=>'',

'comment_ansi'=>'',

'comment_c'=>'',

'digit'=>'',

'digit_hex'=>'teal',

'digit_integer'=>'teal',

'digit_float'=>'aqua',

'punct'=>'fuchsia',

'alpha'=>'',

'alpha_columnType'=>'#FF9900',

'alpha_columnAttrib'=>'#0000FF',

'alpha_reservedWord'=>'#990099',

'alpha_functionName'=>'#FF0000',

'alpha_identifier'=>'black',

'alpha_variable'=>'#800000',

'quote'=>'#008000',

'quote_double'=>'',

'quote_single'=>'',

'quote_backtick'=>''

);

/**

*IfyouwishtousetheSQLValidatorservice,youshouldbe

*awareofthefollowing:

*AllSQLstatementsarestoredanonymouslyforstatisticalpurposes.

*MimerSQLValidator,Copyright2002UprightDatabaseTechnology.

*Allrightsreserved.

*/

$cfg['SQLValidator']['use']=FALSE;//MaketheSQLValidatoravailable

$cfg['SQLValidator']['username']='';//Ifyouhaveacustomusername,specifyithere(defaultstoanonymous)

$cfg['SQLValidator']['password'] = '';      // Password for username

/**

*DevelopersONLY!

*Tousethefollowing,pleaseinstalltheDBGextensionfromhttp://dd.cron.ru/dbg/

*/

$cfg['DBG']['enable']=FALSE;//MaketheDBGstuffavailable

$cfg['DBG']['profile']['enable']=FALSE;//ProduceprofilingresultsofPHP

$cfg['DBG']['profile']['threshold']=0.5;//Thresholdoflongrunningcodetodisplay

                                            // Anything below the threshold is not displayed

/**

*MySQLsettings

*/

//Columntypes;

//varchar,tinyint,textanddatearelistedfirst,basedonestimatedpopularity

$cfg['ColumnTypes']=array(

'VARCHAR',

'TINYINT',

'TEXT',

'DATE',

'SMALLINT',

'MEDIUMINT',

'INT',

'BIGINT',

'FLOAT',

'DOUBLE',

'DECIMAL',

'DATETIME',

'TIMESTAMP',

'TIME',

'YEAR',

'CHAR',

'TINYBLOB',

'TINYTEXT',

'BLOB',

'MEDIUMBLOB',

'MEDIUMTEXT',

'LONGBLOB',

'LONGTEXT',

'ENUM',

'SET'

);

// Atributes

$cfg['AttributeTypes']=array(

'',

'BINARY',

'UNSIGNED',

'UNSIGNEDZEROFILL'

);

// Available functions

if($cfg['ShowFunctionFields']){

$cfg['Functions']=array(

'ASCII',

'CHAR',

'SOUNDEX',

'LCASE',

'UCASE',

'NOW',

'PASSWORD',

'MD5',

'ENCRYPT',

'RAND',

'LAST_Insert_ID',

'COUNT',

'AVG',

'SUM',

'CURDATE',

'CURTIME',

'FROM_DAYS',

'FROM_UNIXTIME',

'PERIOD_ADD',

'PERIOD_DIFF',

'TO_DAYS',

'UNIX_TIMESTAMP',

'USER',

'WEEKDAY',

'CONCAT'

);

//WhichcolumntypeswillbemappedtowhichGroup?

$cfg['RestrictColumnTypes']=array(

'VARCHAR'=>'FUNC_CHAR',

'TINYINT'=>'FUNC_NUMBER',

'TEXT'=>'FUNC_CHAR',

'DATE'=>'FUNC_DATE',

'SMALLINT'=>'FUNC_NUMBER',

'MEDIUMINT'=>'FUNC_NUMBER',

'INT'=>'FUNC_NUMBER',

'BIGINT'=>'FUNC_NUMBER',

'FLOAT'=>'FUNC_NUMBER',

'DOUBLE'=>'FUNC_NUMBER',

'DECIMAL'=>'FUNC_NUMBER',

'DATETIME'=>'FUNC_DATE',

'TIMESTAMP'=>'FUNC_DATE',

'TIME'=>'FUNC_DATE',

'YEAR'=>'FUNC_DATE',

'CHAR'=>'FUNC_CHAR',

'TINYBLOB'=>'FUNC_CHAR',

'TINYTEXT'=>'FUNC_CHAR',

'BLOB'=>'FUNC_CHAR',

'MEDIUMBLOB'=>'FUNC_CHAR',

'MEDIUMTEXT'=>'FUNC_CHAR',

'LONGBLOB'=>'FUNC_CHAR',

'LONGTEXT'=>'FUNC_CHAR',

'ENUM'=>'',

'SET'=>''

    );

    // Map above defined groups to any function

$cfg['RestrictFunctions']=array(

'FUNC_CHAR'=>array(

'ASCII',

'CHAR',

'SOUNDEX',

'LCASE',

'UCASE',

'PASSWORD',

'MD5',

'ENCRYPT',

'LAST_Insert_ID',

'USER',

'CONCAT'

        ),

        'FUNC_DATE'   => array(

'NOW',

'CURDATE',

'CURTIME',

'FROM_DAYS',

'FROM_UNIXTIME',

'PERIOD_ADD',

'PERIOD_DIFF',

'TO_DAYS',

'UNIX_TIMESTAMP',

'WEEKDAY'

        ),

        'FUNC_NUMBER' => array(

'ASCII',

'CHAR',

'MD5',

'ENCRYPT',

'RAND',

'LAST_Insert_ID',

'COUNT',

'AVG',

'SUM'

)

);

} // end if

/**

*Unsetmagic_quotes_runtime-donotchange!

*/

set_magic_quotes_runtime(0);

/**

*FileRevision-donotchangeeither!

*/

$cfg['FileRevision']='$Revision:1.204.2.1$';

?>

相关推荐