CentOS5.8下安装phpMyAdmin3.5.3来远程连接mysql服务器

WEB根目录为:/var/www/html,并将phpMyAdmin-3.5.3-all-languages.tar.gz拷贝到根目录下。

# cd /var/www/html

# tar zxvf phpMyAdmin-3.5.3-all-languages.tar.gz # 将其解压到当前目录下,生成一个名为phpMyAdmin-3.5.3-all-languages的文件夹

# mkdir phpMyAdmin3.5.3

# mv /var/www/html/phpMyAdmin-3.5.3-all-languages /var/www/html/phpMyAdmin3.5.3 # 移动该文件夹到phpMyAdmin3.5.3下

# cp /var/www/html/phpMyAdmin3.5.3/phpMyAdmin-3.5.3-all-languages/libraries/config.default.php /var/www/html/phpMyAdmin3.5.3/phpMyAdmin-3.5.3-all-languages/

# 并将config.default.php文件更名为:config.inc.php

# 用文本编辑器打开config.inc.php或者在shell用vi打开也可以(点击a进入编辑状态,esc退出)

$cfg['PmaAbsoluteUri'] = 'http://192.168.211.133/phpMyAdmin3.5.3';

$cfg['Servers'][$i]['host'] = 'localhost'; # 如果数据库服务器在本地,即设为loaclhost,如果在远程,设为远程的IP地址;

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

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

$cfg['Servers'][$i]['password'] = ''; # 如果有密码就添加进去

$cfg['Servers'][$i]['only_db'] = '';

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

在浏览器中输入:http://192.168.211.133/phpMyAdmin3.5.3/,前提是已经开启httpd服务。


数据库允许远程登录,需要执行:> grant all on *.* to 'username'@'%' identified by 'password' with grant option;



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值