I installed Laravel and cloned a repo from my git server to use on a staging server. After installing all required tools I wanted to migrate the database. The error I now get is:
[2016-05-04 16:54:51] local.ERROR: exception 'PDOException' with message 'could not find driver' in /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:55
#1 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(22): Illuminate\Database\Connectors\Connector->createConnection('mysql:host=46.1...', Array, Array)
#2 /var/www/mfserver/bootstrap/cache/compiled.php(11439): Illuminate\Database\Connectors\MySqlConnector->connect(Array)
#3 /var/www/mfserver/bootstrap/cache/compiled.php(11435): Illuminate\Database\Connectors\ConnectionFactory->createSingleConnection(Array)
#4 /var/www/mfserver/bootstrap/cache/compiled.php(11350): Illuminate\Database\Connectors\ConnectionFactory->make(Array, 'mysql')
#5 /var/www/mfserver/bootstrap/cache/compiled.php(11305): Illuminate\Database\DatabaseManager->makeConnection('mysql')
#6 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(171): Illuminate\Database\DatabaseManager->connection(NULL)
#7 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php(139): Illuminate\Database\Migrations\DatabaseMigrationRepository->getConnection()
#8 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(393): Illuminate\Database\Migrations\DatabaseMigrationRepository->repositoryExists()
#9 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(100): Illuminate\Database\Migrations\Migrator->repositoryExists()
#10 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(58): Illuminate\Database\Console\Migrations\MigrateCommand->prepareDatabase()
#11 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
#12 /var/www/mfserver/bootstrap/cache/compiled.php(1187): call_user_func_array(Array, Array)
#13 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Console/Command.php(150): Illuminate\Container\Container->call(Array)
#14 /var/www/mfserver/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/mfserver/vendor/symfony/console/Application.php(841): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/mfserver/vendor/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/mfserver/vendor/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/mfserver/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/mfserver/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
I installed php-mysql but I don't see why a driver is missing.
/var/www/
folder, which is a default path for many web servers. When installing PHP modules or making PHP configuration changes, you need to restart the web server for those changes to take effect. – Chris Forrence