phpMyAdmin允许定义输入的MySQL服务器IP地址,用户名和密码
修改/libraries/config.default.php
为真即可,简单安全省事
$cfg[‘AllowArbitraryServer‘] = true;
phpMyAdmin修改config.inc.php,服务器地址为下拉列表可选登录多个服务器
增加config.sample.inc.php
文件,参考下面配置或者访问setup手动生成
<?php/* * Generated configuration file * Generated by: phpMyAdmin 4.4.11 setup script * Date: Fri, 10 Jul 2015 15:54:42 +0800 */ /* Servers configuration */$i = 0; /* Server: 10.4.14.64 [1] */$i++;$cfg[‘Servers‘][$i][‘verbose‘] = ‘10.10.6.64‘;$cfg[‘Servers‘][$i][‘host‘] = ‘10.10.6.64‘;$cfg[‘Servers‘][$i][‘port‘] = ‘‘;$cfg[‘Servers‘][$i][‘socket‘] = ‘‘;$cfg[‘Servers‘][$i][‘connect_type‘] = ‘tcp‘;$cfg[‘Servers‘][$i][‘auth_type‘] = ‘cookie‘;$cfg[‘Servers‘][$i][‘user‘] = ‘root‘;$cfg[‘Servers‘][$i][‘password‘] = ‘‘;
/* Server: 10.10.1.172 [2] */$i++;$cfg[‘Servers‘][$i][‘verbose‘] = ‘10.10.1.172‘;$cfg[‘Servers‘][$i][‘host‘] = ‘10.10.1.172‘;$cfg[‘Servers‘][$i][‘port‘] = ‘‘;$cfg[‘Servers‘][$i][‘socket‘] = ‘‘;$cfg[‘Servers‘][$i][‘connect_type‘] = ‘tcp‘;$cfg[‘Servers‘][$i][‘auth_type‘] = ‘cookie‘;$cfg[‘Servers‘][$i][‘user‘] = ‘root‘;$cfg[‘Servers‘][$i][‘password‘] = ‘‘; /* End of servers configuration */ $cfg[‘blowfish_secret‘] = ‘559f78c86f22d8.48481095‘;$cfg[‘DefaultLang‘] = ‘zh_CN‘;$cfg[‘ServerDefault‘] = 1;$cfg[‘UploadDir‘] = ‘‘;$cfg[‘SaveDir‘] = ‘‘;?>
如果mysql是5.1的这个版本php会报错(
您应升级到 MySQL 5.5.0 或更高版本
),解决方案:
vi /var/www/html/phpmyadmin/libraries/common.inc.php #查找 if (PMA_MYSQL_INT_VERSION < 50500) { #更换为 if (PMA_MYSQL_INT_VERSION < 50100) {
时间: 2024-11-08 22:24:37