admin 管理员组

文章数量: 1086019


2024年4月12日发(作者:c语言while函数用法)

phpadmin是用来远程连接MySQL数据库的客户端软件,中资源用户可以参考如下步骤来配

置phpadmin软件:

1. 请您将phpadmin文件下载到您的本地;

2. 将文件解压,生成一个phpadmin的目录;

3. 请客户使用本地主机上的记事本等软件,编辑phpadmin目录下的文件(添

加客户数据库链接信息)修改如下几项设置:

$cfgServers[1]['host'] = 'localhost'; (系统默认主机名为localhost,不需要更改)

$cfgServers[1]['user'] = '数据库管理员名';

$cfgServers[1]['password'] = '密码';

$cfgServers[1]['only_db'] = '数据库(数据库管理员名_db)';

修改完成后,保存文件;

4. 修改配置文件后,将phpadmin目录及其目录下的所有文件,通过ftp上传到客户网站的

根目录下;

5. 在浏览器中键入‘您的域名/phpadmin’即可管理和创建客户的MySQL

数据库。

如何配置PHPadmin

phpadmin就是一个产品,用于管理mysql数据库的,毕竟很多数据库服务器不能够公开连

接,所以只能够使用http的方式来进行连接管理。

下载phpadmin( :8181/down/)解压到apache能

够访问的一个目录中(首先apache和php已经集成好了,能够浏览php页面)。运行访问

会出现一些提示情况。如果你的mysql安全设置不错的话,可能默认情况下是不

能够连接到你的服务器的,需要修改一些配置信息。

修改phpadmin/文件,其中主要是对mysql连接方式,连接路径以及用户名密

码的设置。

修改如下:

$cfg['PmaAbsoluteUri'] = 'localhost/phpadmin/';

$cfg['PmaAbsoluteUri_DisableWarning'] = TRUE;

$cfg['blowfish_secret'] = 'admin';

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

$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket

$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')

$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')

$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection

// (requires PHP >= 4.3.0)

$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings

// (this user must have read-only

$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"

// and "mysql/db" tables).

// The controluser is also

// used for all relational

// features (pmadb)

$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?

$cfg['Servers'][$i]['user'] = ''; // MySQL user

$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed

其中比较重要的几个参数意义:

'PmaAbsoluteUri' phpadmin的全路径,如果在apache中设定了一个alias的话就使用这个了

'PmaAbsoluteUri_DisableWarning' 这个好像是用于取消警告的,经常安装好了在访问的页面

上面会出现一些红色字体的警告(安全等等),如果设置成为true就不出现了

'blowfish_secret' 这个是如果授权方式设置成为cookie的话就会使用这个来进行加密存入到

cookie中的用户名和密码

'auth_type' 用于设置登陆方式,config是直接从这个文件中获取user/password然后连接数据

库,http则是在客户端访问的时候会弹出一个输入用户名密码的框进行认证处理 cookie则

是通过页面输入用户名密码进行连接。其中config的安全等级最低,cookie的等级最高,不

过如果禁用了cookie则无法使用cookie的方式进行认证。

通常设置成为cookie的方式以后要在apache的文件中修改对应的配置:

#added for phpmyadmin

Alias /phpadmin/ "website/phpMyAdmin-2.6.1-rc2/"

#php_admin_flag engine on

#php_admin_flag safe_mode off

DirectoryIndex

Options Indexes MultiViews

AllowOverride None

Order allow,deny

Allow from all

#php_admin_flag engine on

#php_admin_flag safe_mode off

#php_admin_value open_basedir none

#php_admin_value open_basedir "website/phpMyAdmin-2.6.1-rc2/"


本文标签: 连接 方式 修改 进行