0

phpmyadmin安装配置

已有 182 阅读此文人 - - Linux,系统管理 -

安装:下载网址:www.phpmyadmin.net/home_page/downloads.php下载下来解压到网站目录下新建个地址解析到目录下更名phpmyadmin目录下的config.sample.inc.php文件为config.inc.phpmv config.sample.inc.php config.inc.php修改phpmyadmin目录的config.inc.php文件#vi config.inc.php修改下面的选项:$cfg['Servers'][$i]['controluser'] = 'root'; //系统登陆用户名$cfg['Servers'][$i]['controlpass'] = '******'; //登陆名的密码PHPMyadmin配置文件config.inc.php内容如下,在需要设置的地方增加了相关注释。
$cfg['PmaAbsoluteUri'] = '';-----这里设置你的phpmyadmin的URL,如:http://localhost/phpmyadmin/
$cfg['blowfish_secret'] = '';-----设定好root密码后这里也要填写
$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 // (this user must have read-only$cfg['Servers'][$i]['controlpass'] = ''; // access to the "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 // this db is displayed // at left frame // It may also be an array // of db-names-----如果在这里设定一个数据库的名字,那么登陆后框架左边将只显示这个数据库
// set to that server.[color]=red]-----是否显示所有的MySQL服务器$cfg['ServerDefault'] = 1; // Default server (0 = no default server)$cfg['Server'] = '';unset($cfg['Servers'][0]);
/*** Other core phpMyAdmin settings*/$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 // locked tables (since MySQL 3.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 // or not$cfg['IgnoreMultiSubmitErrors'] = FALSE; // if set to true, PMA continues computing multiple-statement queries // even if one of the queries failed$cfg['VerboseMultiSubmit'] = TRUE; // if set to true, PMA will show the affected rows of EACH statement on // multiple-statement queries. See the read_dump.php file for hardcoded // defaults on how many queries a statement may contain!$cfg['AllowArbitraryServer'] = FALSE; // allow login to any user entered server in cookie based auth
// Left frame setup-----左侧框架设置$cfg['LeftFrameLight'] = TRUE; .-----是否使用下拉框显示当前数据库// use a select-based menu and display only the // current tables in the left frame$cfg['LeftFrameTableSeparator']= '__'; // Which string will be used to generate table prefixes // to split tables into multiple categories$cfg['LeftFrameTableLevel'] = '1'; // How many sublevels should be displayed when splitting // 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; // allow to display statistics and space usage in // the pages about database details and table // properties$cfg['ShowMysqlInfo'] = FALSE; -----是否显示MySQL运行时间// whether to display the "MySQL runtime$cfg['ShowMysqlVars'] = FALSE; -----是否显示MySQL系统变量// information", "MySQL system variables", "PHP$cfg['ShowPhpInfo'] = FALSE; -----是否显示PHP信息// information" and "change password" links for$cfg['ShowChgPassword'] = FALSE; -----修改密码选项// simple users or not$cfg['SuggestDBName'] = TRUE; -----是否显示要建立的数据库默认名字// suggest a new DB name if possible (false = keep empty)
// In browse mode...$cfg['ShowBlob'] = FALSE; // display blob field contents$cfg['NavigationBarIconic'] = TRUE; // do not display text inside navigation bar buttons$cfg['ShowAll'] = FALSE; // allows to display all the rows-----是否显示所有数据表行$cfg['MaxRows'] = 30; // maximum number of rows to display-----数据表行每页显示的数量$cfg['Order'] = 'ASC'; // default for 'ORDER BY' clause (valid // values are 'ASC', 'DESC' or 'SMART' -ie // descending order for fields of type // TIME, DATE, DATETIME & TIMESTAMP, // ascending order else-)

$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['MySQLManualBase'] = 'http://www.mysql.com/doc/en';-----MySQL在线手册地址
$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';// Default charset to use for recoding of MySQL queries, does not take// any effect when charsets recoding is switched off by// $cfg['AllowAnywhereRecoding'] or in language file// (see $cfg['AvailableCharsets'] to possible choices, you can add your own)$cfg['DefaultCharset'] = 'iso-8859-1';-----默认的phpmyadmin语言,可设置为:gb2312
* 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-----框架右侧的背景图片地址,不使用背景图片请留空 // (leave blank for no background image)$cfg['LeftPointerColor'] = '#CCFFCC'; // color of the pointer in left frame // (blank for no pointer)-----框架左侧的指向点颜色$cfg['Border'] = 0; // border width on tables-----表格宽度$cfg['ThBgcolor'] = '#D3DCE3'; // table header row colour-----表格头颜色$cfg['BgcolorOne'] = '#CCCCCC'; // table data row colour-----表格中数据所在行的颜色$cfg['BgcolorTwo'] = '#DDDDDD'; // table data row colour, alternate-----表格中数据所在行的交替颜色$cfg['BrowsePointerColor'] = '#CCFFCC'; // color of the pointer in browse mode // (blank for no pointer)*/]$cfg['SQP']['fmtType'] = 'html'; // 查询语句输出样式 (html, text, none)$cfg['SQP']['fmtInd'] = '1'; // 每行间距(floats ok)$cfg['SQP']['fmtIndUnit'] = 'em'; // 每行的缩进单位 (CSS Types - {em,px,pt})$cfg['SQP']['fmtColor'] = array( // 语法颜色数据

期待你一针见血的评论,Come on!

不用想啦,马上 "登录"  发表自已的想法.