[Deployer] Laravelプロジェクトのデプロイ中artisan:migrateでエラー[could not find driver]が出る時

カテゴリ: 未分類

エラー内容

Deployerを使ってLaravelプロジェクトをデプロイしようとしたところ、artisan:migrateでcould not find driverエラーが発生する。

➤ Executing task artisan:migrate

  [Deployer\Exception\RuntimeException (1)]
  The command "/usr/bin/php /.../releases/1/server/artisan migrate --force" failed.

  Exit Code: 1 (General error)


  ================

  In Connection.php line 669:
    could not find driver (SQL: select * from information_schema.tables where 
    table_schema = forge and table_name = migrations and table_type = 'BASE TABLE')


  In Connector.php line 70:
    could not find driver

原因

mysqlのドライバをインストールしていなかったため

対応

下記のコマンドでphpのmysqlndエクステンションをインストールする

yum install --enablerepo=remi php-mysqlnd

インストール後php -mコマンドでインストールできたか確認する

$ php -m | grep mysql
mysqli
mysqlnd
pdo_mysql

Amazonでおトクに買い物する方法
AmazonチャージでポイントGET


Amazonは買いもの前にAmazonギフト券をチャージしてポイントをゲットしないと損!

こちらもおススメ

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です