现在的位置: 首页 > 综合 > 正文

phpmyadmin 添加server

2018年04月15日 ⁄ 综合 ⁄ 共 744字 ⁄ 字号 评论关闭

现在至少需要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';
*/

【上篇】
【下篇】

抱歉!评论已关闭.