![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
局域网本机我用phpMyAdmin 2.7.0-pl想对默认的mysql3.x 进行配置
每次都 提示 :phpMyAdmin 试图连接到 MySQL 服务器,但服务器拒绝连接。您应该检查 config.inc.php 中的主机、用户名和密码,并且确定这些信息与 MySQL 服务器的管理员所给出的信息一致。
可是我在doc 下可以进入数据库。(doc 下输入show databases 可以看到默认的mysql 和test,是不是说明安装没问题啊?)
phpMyAdmin 配置如下:
$i++;
$cfg['Servers'][$i]['host'] = '172.31.121.194';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = 'cookie'; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires 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).
// The controluser is also
// used for all relational
// features (pmadb)
$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]['only_db'] = '';

