doutuoji8418 2015-10-15 07:51
浏览 115
已采纳

php artisan migrate [PDOException]找不到驱动程序

When I write command "php artisan migrate" from mysql connection,linux terminal gives this error :[PDOException] could not find driver.

When I add to php.ini

extension=pdo.so 
extension=pdo_mysql.so

, error has changing like this:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/pdo_mysql.so' - /usr/lib/php5/20121212/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Module 'PDO' already loaded in Unknown on line 0

[PDOException]
could not find driver

How can we solve this issue?

Thanks

  • 写回答

1条回答 默认 最新

  • dtds8802 2015-10-15 08:10
    关注

    Hi you need to install php pdo driver Open terminal

    sudo apt-get install php5-mysql
    

    Restart Apache server

    sudo service apache2 restart
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 需要跳转番茄畅听app的adb命令
  • ¥50 寻找一位有逆向游戏盾sdk 应用程序经验的技术
  • ¥15 请问有用MZmine处理 “Waters SYNAPT G2-Si QTOF质谱仪在MSE模式下采集的非靶向数据” 的分析教程吗
  • ¥50 opencv4nodejs 如何安装
  • ¥15 adb push异常 adb: error: 1409-byte write failed: Invalid argument
  • ¥15 nginx反向代理获取ip,java获取真实ip
  • ¥15 eda:门禁系统设计
  • ¥50 如何使用js去调用vscode-js-debugger的方法去调试网页
  • ¥15 376.1电表主站通信协议下发指令全被否认问题
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证