phpmyadmin报错提示
Access forbidden!
New XAMPP security concept:
Access to the requested directory is only available from the local network.
This setting can be configured in the file “httpd-xampp.conf”.
XAMPP在macOS下无法访问phpmyadmin原因
权限不足
因为是以”虚拟机“方式保存xampp文件,所以电脑访问也成了非本地访问
本文同时可以解决外部或其他电脑无法访问xampp中phpmyamdin的问题
因为同样都是本地权限限制导致的
编辑”httpd-xampp.conf文件增加权限
- 打开XAMPP面板>Volumes>/opt/lampp为”Mount“状态;
- 点击Explore;
- 依次打开路径:etc/extra/中”httpd-xampp.conf”文件;
- 找到
<Directory "/opt/lampp/phpmyadmin">
并修改里面内容; - 将Require local这行替换为以下内容:
1
2
3Order allow,deny
Allow from all
Require all granted - 保存”httpd-xampp.conf”文件;
- 重启Apache:打开XAMPP面板>Services>Apache>Restart。
参考文献
Access to the requested object is only available from the local network phpmyadmin
https://stackoverflow.com/questions/11999371/access-to-the-requested-object-is-only-available-from-the-local-network-phpmyadm/20965749
后面发现官方有相关文档,名为:Enable Remote Access to phpMyAdmin(文档路径:<你的IP>/dashboard/docs/access-phpmyadmin-remotely.html);
其实主要修改Require这行即可!
下载XAMPP
https://www.apachefriends.org/
Relay Tips: 一极乐( https://yijile.com/log/592/ )