我想做我的支持数据库。我在 config.inc.php 文件中有登录我的数据库的信息(主机、登录名、密码)。
但我想为所有定义的数据库设置全局用户。所以我写了全局登录名和密码,可以管理我定义的所有数据库。但是不知道怎么弄?
这是我的 config.inc.php 的片段:
/*
* Servers configuration
*/
$i = 0;
/* Authentication type */
$i++;
$cfg['Servers'][$i]['user'] = 'global user';
$cfg['Servers'][$i]['password'] = 'password global user\'s'; // use here your password
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/* Server parameters */
$i++;
$cfg['Servers'][$i]['host'] = 'host.frist.database';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['hide_db'] = 'information_schema';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['user'] = 'user.frist.bazy';
$cfg['Servers'][$i]['password'] = 'password.frist.database';
$i++;
$cfg['Servers'][$i]['host'] = 'host.second.database';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['hide_db'] = 'information_schema';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['user'] = 'user.second.bazy';
$cfg['Servers'][$i]['password'] = 'password.second.database';
不知道怎么弄