配置phpMyAdmin的站点 多端口牵扯到 mysql 多实例
进入该站点的根目录 下载 phpMyAdmin 的包 接下来就是修改 配置文件
vim config.inc.php
未修改时
- $i++;
- /* Authentication type */
- $cfg['Servers'][$i]['auth_type'] = 'cookie';
- /* Server parameters */
- $cfg['Servers'][$i]['host'] = 'localhost';
- $cfg['Servers'][$i]['connect_type'] = 'tcp';
- $cfg['Servers'][$i]['compress'] = false;
- /* Select mysql if your server does not have mysqli */
- $cfg['Servers'][$i]['extension'] = 'mysqli';
- $cfg['Servers'][$i]['AllowNoPassword'] = false;
修改后 以及添加配置
- $i++;
- /* Authentication type */
- $cfg['Servers'][$i]['auth_type'] = 'cookie';
- /* Server parameters */
- $cfg['Servers'][$i]['host'] = '127.0.0.1';
- $cfg['Servers'][$i]['connect_type'] = 'socket';
- $cfg['Servers'][$i]['compress'] = false;
- /* Select mysqli if your server has it */
- $cfg['Servers'][$i]['extension'] = 'mysqli';
- $cfg['Servers'][$i]['AllowNoPassword'] = false;
- /* mysql的socket 文件的位置 */
- $cfg['Servers'][$i]['socket'] ='/var/lib/mysql/mysql.sock';
- $cfg['Servers'][$i]['port'] = '3306';
多个端口的
- $i++;
- /* Authentication type */
- $cfg['Servers'][$i]['auth_type'] = 'cookie';
- /* Server parameters */
- $cfg['Servers'][$i]['host'] = '127.0.0.1';
- $cfg['Servers'][$i]['connect_type'] = 'socket';
- $cfg['Servers'][$i]['compress'] = false;
- /* Select mysqli if your server has it */
- $cfg['Servers'][$i]['extension'] = 'mysqli';
- $cfg['Servers'][$i]['AllowNoPassword'] = false;
- /* mysql的socket 文件的位置 */
- $cfg['Servers'][$i]['socket'] ='/var/lib/mysql/mysql.sock';
- $cfg['Servers'][$i]['port'] = '3306';#if your mysql have other port
- *************************************************************************
- $i++;
- $cfg['Servers'][$i]['auth_type'] = 'cookie';
- /* Server parameters */
- $cfg['Servers'][$i]['host'] = '127.0.0.1';
- $cfg['Servers'][$i]['connect_type'] = 'socket';
- $cfg['Servers'][$i]['compress'] = false;
- /* Select mysqli if your server has it */
- $cfg['Servers'][$i]['extension'] = 'mysqli';
- $cfg['Servers'][$i]['AllowNoPassword'] = false;
- /* mysql的socket 文件的位置 */
- $cfg['Servers'][$i]['socket'] ='/home/data/mysql/5510/data/mysql.sock';
- $cfg['Servers'][$i]['port'] = '5510';
- ********************** 远程连接 ***************************************
- $i++;
- /* Authentication type */
- $cfg['Servers'][$i]['auth_type'] = 'cookie';
- $cfg['blowfish_secret'] = '#hk7f9&7)$x';
- /* Server parameters */
- #$cfg['PmaAbsoluteUri'] = 'http://www.mysql.com';
- $cfg['Servers'][$i]['host'] = '128.34.13.4';
- $cfg['Servers'][$i]['connect_type'] = 'tcp';
- $cfg['Servers'][$i]['compress'] = false;
- $cfg['Servers'][$i]['AllowNoPassword'] = false;
- $cfg['Servers'][$i]['user'] = 'root';
- $cfg['Servers'][$i]['password'] = '123456';
- $cfg['Servers'][$i]['port'] = '3308';
没有评论