phpmyadmin安装与配置

内容纲要

https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zip

以上版本支持php5.5以下

解压到php根目录

修改,config.sample.inc.php 为 config.inc.php

配置内容

$cfg['Servers'][$i]['auth_type'] = 'cookie';

$cfg['Servers'][$i]['host'] = 'localhost';

$cfg['Servers'][$i]['connect_type'] = 'tcp';

$cfg['Servers'][$i]['compress'] = false;

$cfg['Servers'][$i]['extension'] = 'mysqli';

$cfg['Servers'][$i]['AllowNoPassword'] = false;

$cfg['Servers'][$i]['AllowRoot'] = false;

$cfg['Servers'][$i]['only_db'] = array('');//设置只显示哪些库

$cfg['PmaAbsoluteUri']="";//设置访问域名

若想限制某些用户不能登录,在

\library\common.inc.php 内查找 AllowRoot

将 if 修改为限制用户即可

            if (!$cfg['Server']['AllowRoot'] && ($cfg['Server']['user'] == 'root'||$cfg['Server']['user'] == '')) {

                $allowDeny_forbidden = true;

                PMA_log_user($cfg['Server']['user'], 'root-denied');

                $auth_plugin->authFails();

            }

在ubuntu下需要安装  php5-mysql 组件

之后在 /etc/php5/fpm/php.ini 中配置

所有的 default_socket= /tmp/mysql.sock

发表回复