3
我想在我的Laravel 5.2框架中使用MySQL数据库。运行php artisan serve
并打开本地主页后,我无法访问phpMyAdmin。Laravel MySQL数据库设置错误
我.env
文件:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=people
DB_USERNAME=pftest
DB_PASSWORD="pftest_2016#9"
这样做后,我跑php artisan migrate
并得到了以下错误:其中,我已经安装了php-mysql
扩展,在检查其存在
[PDOException] could not find driver
关注php.ini
文件。 但我还是发现了以下错误:
[PDOException] SQLSTATE[HY000] [2002] Connection refused
那么,什么是问题,怎么解决呢?
检查密码“pftest_2016#9”或pftest_2016#9? –
从命令行运行'php --ini'并确保它使用的是您认为正在使用的.ini文件。 – Pitchinnate
@kirangadhvi它不一样..读取错误..我的错误是:[PDOException] SQLSTATE [HY000] [2002]连接拒绝 –