3

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

4
  • can you check that php_pdo_mysql.dll exist or not? Commented Oct 15, 2015 at 7:56
  • I am working with Linux Mint Commented Oct 15, 2015 at 7:58
  • locate pdo_mysql.so Commented Oct 15, 2015 at 8:03
  • @badman btw i would suggest you to use either centos or ububtu as server Commented Oct 15, 2015 at 8:47

1 Answer 1

4

Hi you need to install php pdo driver Open terminal

sudo apt-get install php5-mysql

Restart Apache server

sudo service apache2 restart
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.