歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> CentOS 6.2安裝phpMyAdmin3.3.10

CentOS 6.2安裝phpMyAdmin3.3.10

日期:2017/2/28 15:46:47   编辑:Linux教程

我的網站根目錄地址為/var/www/html,phpmyadmin安裝包在/tmp下。

[root@CentOS ~]# tar -zxvf /tmp/phpMyAdmin-2.11.9-all-languages.tar.gz -C /var/www/html
[root@CentOS ~]# mv phpMyAdmin-2.11.9-all-languages phpmyadmin
[root@CentOS ~]# cp /var/www/phpmyadmin/libraries/config.default.php /var/www/phpmyadmin/config.inc.php[root@CentOS ~]# vi /var/www/phpmyadmin/config.inc.php
下面就來修改文檔。

1,查找 $cfg['PmaAbsoluteUri'] 修改為你將上傳到空間的phpMyAdmin的網址

例如:$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';

2,$cfg['Servers'][$i]['host'] = 'localhost';(通常用默認,也有例外,可以不用修改)

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

在自己的機子裡調試用config;如果在網絡上的空間用cookie,這裡我們既然在前面已經添加了網址,就修改成cookie ,這裡建議使用cookie.

4,$cfg['Servers'][$i]['user'] = 'root'; // MySQL user(mysql用戶名,自己機裡用root;)

5,$cfg['Servers'][$i]['password'] = ''; // MySQL password (mysql用戶的密碼,自己的服務器一般都是mysql用戶root的密碼)

6,$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only(你只有一個數據就設置一下;如果你在本機或想架設服務器,那麼建議留空)

7,$cfg['DefaultLang'] = 'zh';

如果出現“配置文件現在需要絕密的短語密碼(blowfish_secret)”那麼請在$ cfg['blowfish_secret'] = ' ';的等號裡面設置你網站的cookie,例如:$cfg['blowfish_secret'] = '任意字符';這是因為你的“$cfg['Servers'][$i]['auth_type'] = 'cookie'的原因。

一切順利的話,打開http://localhost/phpmyadmin/ 輸入用戶名和密碼就能正常登陸。

Copyright © Linux教程網 All Rights Reserved