phpMyAdmin 非yum安装配置以及多端口

2016年7月12日

配置phpMyAdmin的站点 多端口牵扯到 mysql 多实例

进入该站点的根目录 下载 phpMyAdmin 的包 接下来就是修改 配置文件

vim config.inc.php

未修改时

  1. $i++;
  2. /* Authentication type */
  3. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  4. /* Server parameters */
  5. $cfg['Servers'][$i]['host'] = 'localhost';
  6. $cfg['Servers'][$i]['connect_type'] = 'tcp';
  7. $cfg['Servers'][$i]['compress'] = false;
  8. /* Select mysql if your server does not have mysqli */
  9. $cfg['Servers'][$i]['extension'] = 'mysqli';
  10. $cfg['Servers'][$i]['AllowNoPassword'] = false;

修改后 以及添加配置

  1. $i++;
  2. /* Authentication type */
  3. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  4. /* Server parameters */
  5. $cfg['Servers'][$i]['host'] = '127.0.0.1';
  6. $cfg['Servers'][$i]['connect_type'] = 'socket';
  7. $cfg['Servers'][$i]['compress'] = false;
  8. /* Select mysqli if your server has it */
  9. $cfg['Servers'][$i]['extension'] = 'mysqli';
  10. $cfg['Servers'][$i]['AllowNoPassword'] = false;
  11. /* mysql的socket 文件的位置 */
  12. $cfg['Servers'][$i]['socket'] ='/var/lib/mysql/mysql.sock';
  13. $cfg['Servers'][$i]['port'] = '3306';

多个端口的

  1. $i++;
  2. /* Authentication type */
  3. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  4. /* Server parameters */
  5. $cfg['Servers'][$i]['host'] = '127.0.0.1';
  6. $cfg['Servers'][$i]['connect_type'] = 'socket';
  7. $cfg['Servers'][$i]['compress'] = false;
  8. /* Select mysqli if your server has it */
  9. $cfg['Servers'][$i]['extension'] = 'mysqli';
  10. $cfg['Servers'][$i]['AllowNoPassword'] = false;
  11. /* mysql的socket 文件的位置 */
  12. $cfg['Servers'][$i]['socket'] ='/var/lib/mysql/mysql.sock';
  13. $cfg['Servers'][$i]['port'] = '3306';#if your mysql have other port
  14. *************************************************************************
  15. $i++;
  16. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  17. /* Server parameters */
  18. $cfg['Servers'][$i]['host'] = '127.0.0.1';
  19. $cfg['Servers'][$i]['connect_type'] = 'socket';
  20. $cfg['Servers'][$i]['compress'] = false;
  21. /* Select mysqli if your server has it */
  22. $cfg['Servers'][$i]['extension'] = 'mysqli';
  23. $cfg['Servers'][$i]['AllowNoPassword'] = false;
  24. /* mysql的socket 文件的位置 */
  25. $cfg['Servers'][$i]['socket'] ='/home/data/mysql/5510/data/mysql.sock';
  26. $cfg['Servers'][$i]['port'] = '5510';
  27. **********************  远程连接 ***************************************
  28. $i++;
  29. /* Authentication type */
  30. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  31. $cfg['blowfish_secret'] = '#hk7f9&7)$x';
  32. /* Server parameters */
  33. #$cfg['PmaAbsoluteUri'] = 'http://www.mysql.com';
  34. $cfg['Servers'][$i]['host'] = '128.34.13.4';
  35. $cfg['Servers'][$i]['connect_type'] = 'tcp';
  36. $cfg['Servers'][$i]['compress'] = false;
  37. $cfg['Servers'][$i]['AllowNoPassword'] = false;
  38. $cfg['Servers'][$i]['user'] = 'root';
  39. $cfg['Servers'][$i]['password'] = '123456';
  40. $cfg['Servers'][$i]['port'] = '3308';

没有评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注