当前位置:编程学习 > php >>

教你如何 配置 phpMyAdmin

教你如何 配置 phpMyAdmin

下载:请到phpmyadmin官方站点 http://www.phpmyadmin.net/ 下载phpmyadmin文件,

解压后对phpmyadmin进行设置我边讲例子别解析:

解压后得到一个目录,与以前的版本不同,2.8版的phpMyAdmin 的根目录中没有名为 config.inc.php 的配置文件,现在的配置文件是 libraries/config.default.php 进在该文件中

我的目录为:http://www.226511.com/myadmin/


找到 $cfg['PmaAbsoluteUri']
修改你将上传到空间的phpMyAdmin的网址
如:$cfg['PmaAbsoluteUri'] = 'http://yoursite/phpmyadmin/';

还有下面的
$cfg['Servers'][$i]['host'] = 'localhost';(通常用默认, 也可能是主机IP)


$cfg['Servers'][$i]['host'] = 'localhost;这里是默认的我们一般不改

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

$cfg['Servers'][$i]['user'] = 'root';

$cfg['Servers'][$i]['password'] = '******';

为了安全起见我们找到设置$cfg['Servers'][$i]['auth_type'] = ''修改值勤cookie


$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
config: 按照 自身 libraries/config.default.php 文件中的配置提供用户名和密码
cookie:用于输入口令方式登陆,如果选择此项,需要设置$cfg['blowfish_secret'] = 'cookie';(见后面的介绍)

$cfg['Servers'][$i]['user'] = 'root'; // MySQL user(用户名,自己机里用root,在网上设你的mysql用户名)
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
自己机里不用设
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only(你只有一个数据就设置一下)

注:$cfg['blowfish_secret'] = '';
本机的话不需要设置,但是网络的话需要设置成cookie:
$cfg['blowfish_secret'] = 'cookie';

设置完毕可以上传到网上了。

浏览http://yoursite//phpmyadmin/ 当然你设置不同就用那个网址。
如果设置$cfg['Servers'][$i]['auth_type'] = 'cookie'; 所以显示会要求输入帐号密码,这里的帐号和密码你在提供商获得的mysql数据库的帐号、密码。

好了,就这么简单,对新手应该有一点点帮助.

补充:Php教程,Php入门 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,