sunvince

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

现在至少需要mysql添加一个只读权限

INSERT INTO user (Host,User,Password) VALUES('%','zhouwei',PASSWORD('zhouwei'));
update user set Show_db_priv='Y',Select_priv='Y' where Host='%' and User='zhouwei';
FLUSH PRIVILEGES;



然后添加phpmyadmin/config.inc.php

/*
 * End of servers configuration
 */

在这行注释只上添加



/**
#example
$i++;
# Authentication type and info
$cfg['Servers'][$i]['auth_type']            = 'config';
$cfg['Servers'][$i]['user']                 = 'zhouwei';
$cfg['Servers'][$i]['password']             = 'zhouwei';
$cfg['Servers'][$i]['AllowNoPassword']      = true;
$cfg['Servers'][$i]['host']             = 'localhost';
$cfg['Servers'][$i]['port']             = '3306';
$cfg['Servers'][$i]['connect_type']     = 'tcp';
$cfg['Servers'][$i]['compress']         = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
*/

posted on 2011-03-24 10:11  sunvince  阅读(230)  评论(0)    收藏  举报