|
|
系统FC3, php-5.1.4 ,httpd-2.2.2 ,MySQL-5.0.22,phpMyAdmin-2.5.7
我已关闭selinux
现在情况是 apache 和 在终端下使用mysql都正常, apache目录是/usr/local/apache/,
我把phpMyAdmin-2.5.7也解压到了/usr/local/apache/ 这个目录, 我在httpd.conf用别名的方法
来指定phpmyadmin的url.加入下面这行: (此时对phpmyadmin的配置文件没做修改)
Alias /phpmyadmin "/usr/local/apache/phpMyAdmin-2.5.7"
没想到用浏览器http://localhost/phpmyadmin时显示如下:
Forbidden
You don't have permission to access /phpmyadmin on this server.
在浏览器敲入http://自己的ip/phpmyadmin和上面是一个结果
- - - - - -- - - - - - - - - - -------
然后我把httpd.conf 改回原状, 去配置php的配置文件config.inc.php
$cfg['PmaAbsoluteUri'] = 'http://自己ip/usr/local/apache/phpMyAdmin-2.5.7';
再用localhost和自己的ip进行测试,显示如下:
Not Found
The requested URL /phpmyadmin was not found on this server.
和上面的错误不一样了,可是还是不行啊, 配置文件不分如下:
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
我在终端下使用root无密码登录mysql好使
[root@freedom ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 5.0.22-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.04 sec)
mysql> exit
Bye
[root@freedom ~]#
我分析是不是与我的主机名有关啊,安装系统时我指定主机名是freedom ,但这里写的是
localhost,/etc/hosts文件如下:
127.0.0.1 freedom localhost.localdomain localhost
本人菜鸟一个,第一次使用phpmyadmin,哪里设置的不对啊???恳请兄弟们指教了.万分感激 |
|