热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

php+未找到驱动程序,php–Laravel5PDOException无法找到驱动程序

我使用Laravel5时遇到问题.当我运行“phparitsanmigrate”时,我收到了这个错误***************************************A

我使用Laravel 5时遇到问题.当我运行“php aritsan migrate”时,我收到了这个错误

**************************************

* Application In Production! *

**************************************

Do you really wish to run this command? [y/N] y

[PDOException]

could not find driver

我可以运行应用程序,但是当需要数据库连接时,我收到了这个错误

PDOException in Connector.php line 55:

could not find driver

in Connector.php line 55

at PDO->__construct('mysql:host=localhost;dbname=mydb', 'root', '', array('0', '2', '0', false, false)) in Connector.php line 55

at Connector->createConnection('mysql:host=localhost;dbname=mydb', array('driver' => 'mysql', 'host' => 'localhost', 'database' => 'mydb', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'name' => 'mysql'), array('0', '2', '0', false, false)) in MySqlConnector.php line 22

怎么解决?

解决方法:

您应该在服务器上安装PDO.

编辑你的php.ini(查看你的phpinfo(),“加载配置文件”行,找到php.ini文件路径).

查找并取消注释以下行(删除;字符):

;extension=pdo_mysql.so

然后,重新启动Apache服务器.

欲了解更多信息,请read the documentation.

标签:php,laravel,laravel-5,mysql

来源: https://codeday.me/bug/20190917/1808737.html



推荐阅读
author-avatar
极神bd韵
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有