본문 바로가기
MySql

MySQL Laravel 5 PDOException이 드라이버를 찾을 수 없음

by 베이스 공부 2020. 11. 12.
반응형

Laravel 5를 사용하는 데 문제가 있습니다. "php artisan 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를 설치해야합니다. Edit your php.ini (look at your phpinfo(), "Loaded Configuration File" line, to find the php.ini file path). 다음 줄을 찾아 주석 처리를 제거합니다 (; 문자 제거).

;extension=pdo_mysql.so

그런 다음 Apache 서버를 다시 시작하십시오.


 

참조 페이지 https://stackoverflow.com/questions/35240414

 

 

반응형

댓글