7

详解PHPMyadmin的配置

 1 year ago
source link: https://blog.p2hp.com/archives/11230
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

详解PHPMyadmin的配置 | Lenix Blog

PHPMyadmin 是一款非常好用的数据库管理界面,尤其适合对数据库操作命令不熟悉的新手。其中PHPMyadmin也有很多的配置项,我们今天就来详解一下PHPMyadmin的配置文件.

phpmyadmin快速入门教程

PHPMyadmin配置文件config.inc.php内容如下,在需要设置的地方增加了相关注释 .

下面我就说下怎么安装该工具:

1. phpmyadmin下载

先到网上下载phpmyadmin,再解压到可以访问的web目录下(如果是虚拟空间,可以解压后通过ftp等上传到web目录下),当然您可以修改解压后该文件的名称。

2. 配置config文件
打开libraries下的config.default.php文件,依次找到下面各项,按照说明配置即可:

A.访问网址

$cfg['PmaAbsoluteUri'] = '';

这里填写phpmyadmin的访问网址,如:$cfg['PmaAbsoluteUri'] = 'http://你的站点/phpmyadmin/';

B.mysql主机信息

$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address

填写localhost或mysql所在服务器的ip地址,如果mysql和该phpmyadmin在同一服务器,则按默认localhost

$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port

mysql端口,如果是默认3306,保留为空即可

C.mysql用户名和密码

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

MySQL user 访问phpmyadmin使用的mysql用户名

fg['Servers'][$i]['password'] = '';

MySQL password (only needed对应上述mysql用户名的密码

D.认证方法

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

在此有四种模式可供选择:cookie,http,HTTP,config

01:config方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。

02:当该项设置为cookie,http或HTTP时,登录phpmyadmin需要数据用户名和密码进行验证,

具体如下:

PHP安装模式为Apache,可以使用http和cookie;

PHP安装模式为CGI,可以使用cookie

E.短语密码(blowfish_secret)的设置

$cfg['blowfish_secret'] = '';

如果认证方法设置为cookie,就需要设置短语密码,置于设置为什么密码,由您自己决定 ,但是不能留空,否则会在登录phpmyadmin时提示错误 。

好了,到此为止,您已经成功安装了phpmyadmin,简单吧 ,赶快登录体验下吧


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK