今天,数据库抽风,在地址栏输入localhost/phpmyadmin尽然显示没有访问权限的英文。。。。查了资料都是有好多解决方案,基本都是先点击绿色的w图标,然后找到apache下的httpd.conf,然后将里面的 Deny from 127.0.0.1修改为all。
<Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all </Directory>
但是我的本来就是这样,后来发现是修改错了文件,而网上都没有说明,真正要找到的是Apache下的Alias目录下的http://localhost/phpmyadmin下的Edit alias,并将以下代码
<Directory "c:/wamp/apps/phpmyadmin3.5.1/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1
</Directory>
修改为
<Directory "c:/wamp/apps/phpmyadmin3.5.1/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all </Directory>
只需要将里面的内容换一下就行了,上面放在哪个磁盘就不用改了,也就是
Deny from all Allow from 127.0.0.1 换成 Allow from all 就行了
上面要是有127.0.0.1也替换成all
最终修改结果如下:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.5.1/" # to give access to phpmyadmin from outside # replace the lines # # Order Deny,Allow # Allow from all # # by # # Order Allow,Deny # Allow from all # <Directory "F:/wamp/apps/phpmyadmin3.5.1/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all </Directory>
保存,重启,搞定