我正在使用Vagrant Homestead。通过MySQL Workbench与MySQL服务器的连接效果很好。但是PhpMyAdmin不起作用。每次使用正确的配置都会抛出“ 502 Bad Gateway”。 MySQL Workbench和PhpMyAdmin的配置相同。所有其他php项目都能正常工作。
之后:
sudo service php7.3-fpm status
我明白了:
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
//some information
Feb 01 13:14:05 homestead phpMyAdmin[8030]: user denied: blahblah (mysql-denied) from 192.168.10.1
Feb 01 13:16:35 homestead phpMyAdmin[8032]: user denied: blahblah (mysql-denied) from 192.168.10.1
Feb 01 13:16:37 homestead phpMyAdmin[8330]: user denied: blahblah (mysql-denied) from 192.168.10.1
Feb 01 13:25:47 homestead phpMyAdmin[8332]: user denied: blahblah (mysql-denied) from 192.168.10.1
Feb 01 13:29:22 homestead phpMyAdmin[8032]: user denied: blahblah (mysql-denied) from 192.168.10.1
Feb 01 13:33:15 homestead phpMyAdmin[8644]: user denied: homestead (mysql-denied) from 192.168.10.1
Feb 01 13:33:16 homestead phpMyAdmin[8648]: user denied: homestead (mysql-denied) from 192.168.10.1
Feb 01 13:34:05 homestead phpMyAdmin[8644]: user denied: homestead (mysql-denied) from 192.168.10.1
Feb 01 13:34:53 homestead phpMyAdmin[8644]: user denied: homestead (mysql-denied) from 192.168.10.1
Feb 01 13:35:14 homestead phpMyAdmin[8670]: user denied: homestead (mysql-denied) from 192.168.10.1
如何解决这个问题?
一切都可以在Windows中正常运行,但是现在我正在使用Mac OS。这不是因为nginx配置。因为如果我将phpMyAdmin替换为简单的hello world php文件,那就可以了。
答案 0 :(得分:1)
在解决方案是在这里:https://github.com/laravel/homestead/issues/1045
如我所见,新的Vagrant Homestead和Mac OS Mojave都会发生这种情况。
只需在 Homestead.yaml
中添加php版本sites:
- map: example.test
to: /home/vagrant/code/public
php: "7.2"