phpMyAdmin2911 安装与配置

本文介绍了如何下载、解压并配置phpMyAdmin的过程。详细说明了如何设置访问URL、登录方式及MySQL服务器配置等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


1.下载解压
  下载 phpMyAdmin2911.tar.gz 到 /usr/local/src
  cd /home/web/
  tar -zxvf /usr/local/src/phpMyAdmin2911.tar.gz
  ln phpMyAdmin2911.tar.gz phpmyadmin
 
2.配置:
  cd /home/web/phpmyadmin
  vi libraries/config.default.php
  ------------------------------------
  $cfg['PmaAbsoluteUri'] = 'http://10.0.0.70/phpmyadmin';  //
  $cfg['blowfish_secret'] = '123456';
  $cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP addess
  $cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blankfor default port
  $cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leae blank for default socket
  $cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQLerver ('tcp' or 'socket')
  $cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extensiono use ('mysql' or 'mysqli')
  $cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocolor the MySQL connection
                                                      // (requires PHP >= 4.3.0)
  $cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settigs
                                                      // (this user must have rea-only
  $cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/use"    
  $cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
  $cfg['Servers'][$i]['user']          = 'root';      // MySQL user
  $cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                      // with 'config' auth_type)
  $cfg['Servers'][$i]['nopassword']    = FALSE;       // Whether to try to connect without password
  $cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
                                                      // this db is displayed in left frame
 
 

网上以前版本的相关资料
---------------------------------------------------------
config.inc.php
 
这里是设置访问 phpmyadmin 的 URL 的,如果你将 phpmyadmin 放在站点根目录下,那么应该如下设置:
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';
 
 
随意输出一个字符串:
$cfg['blowfish_secret'] = 'phpmyadmin';
 
Server(s) configuration 部分。我们配制这个只有自己用,所以设置一个就可以了,找到并设置如下这几行:
$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
 
第一行是设置 MySQL 运行的主机名或 IP ,一般按照默认的即可。
第二行设置 MySQL 的端口,一般也按照默认的即可。
第三行设置登录方式,可以选择三种方式登录,一种是直接根据下面两行输入的用户名和密码登录,一种是 http 方式登录,第三种是 Cookie
方式登录。
如果是本机调试代码,并且别人不会随意修改你的数据库。那么直接使用 config 就行了,在下面输出用户名密码。(首次安装 MySQL 的时候
,默认用户名是 root,密码为空)。
如果选择 http 方式登录,当你通过 URL 访问 PHPMyAdmin 的时候,会弹出一个对话框,正确输入用户名密码后即可登陆。
如果选择 cookie 方式登录,那么访问 PHPMyAdmin 的时候将会有一个登录页面,这里我们选择 cookie 登录方式。设置后如下:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值