【发布时间】:2018-09-04 20:54:47
【问题描述】:
我想通过 php artisan migrate 进行迁移,但出现错误:
In Connection.php line 664:
could not find driver (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations)
In Connector.php line 67:
could not find driver
我的环境文件设置:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
【问题讨论】:
-
尝试清除缓存,触发命令
php artisan config:cache -
是否安装了 PDO?检查您的 PHP CLI 配置。
-
是的,PDO 已经安装好了,我在没有 laravel 的情况下使用了很多次
-
确保也为 CLI 安装了它。做
php -i | grep -i pdo。命令行和浏览器的配置可能不同。 -
你可以尝试将端口更改为 33060 吗?
标签: php mysql laravel migration