Я установил Laravel Усадьба. Я делал это раньше. Все прошло отлично в прошлом. Но сейчас мне очень тяжело. Я установил его в Windows и настроил файл .env так:
DB_CONNECTION=mysql
DB_HOST=192.168.10.10
DB_PORT=3306
DB_DATABASE=aff
DB_USERNAME=homestead
DB_PASSWORD=secret
Но после этого и запуска
php artisan migrate
это дает мне это:
Illuminate\Database\QueryException : could not find driver (SQL: select * fr
om information_schema.tables where table_schema = aff and table_name = migration
s)
at C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate\
Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll
format the error
661| // message to include the bindings with SQL, which will make th
is exception a
662| // lot more helpful to the developer instead of just the databa
se's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("could not find driver")
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\Connector.php:68
2 PDO::__construct("mysql:host=192.168.10.10;port=3306;dbname=aff", "homeste
ad", "secret", [])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\Connector.php:68
Please use the argument -v to see more details.
И когда я пытаюсь подключиться к базе данных в PHPStorm, как в прошлом, я получаю это сообщение об ошибке:
Connection to aff@192.168.10.10 failed.
[S1009] The connection property 'zeroDateTimeBehavior' acceptable values are: 'CONVERT_TO_NULL', 'EXCEPTION' or 'ROUND'. The value 'convertToNull' is not acceptable.
Может кто-нибудь объяснить мне, почему это происходит? Да, aff это база данных. У меня нет проблем при входе через adminer на моем сервере, и я просто так растерялся, почему это не работает. Я должен использовать 192.168.10.10, потому что это ip виртуальной коробки. Я также использовал localhost, и он все еще не работал, пока кто-то не прокомментировал это, ха-ха. Какие-либо предложения? Любые запросы на дополнительную информацию? Мне очень нужна помощь! : D
ОБНОВЛЕНИЕ: Когда я запускаю php artisan migrate -v, это то, что я получаю:
Illuminate\Database\QueryException : could not find driver (SQL: select * fr
om information_schema.tables where table_schema = aff and table_name = migration
s)
at C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate\
Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll
format the error
661| // message to include the bindings with SQL, which will make th
is exception a
662| // lot more helpful to the developer instead of just the databa
se's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("could not find driver")
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\Connector.php:68
2 PDO::__construct("mysql:host=192.168.10.10;port=3306;dbname=aff", "homeste
ad", "secret", [])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\Connector.php:68
3 Illuminate\Database\Connectors\Connector::createPdoConnection("mysql:host=
192.168.10.10;port=3306;dbname=aff", "homestead", "secret", [])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\Connector.php:44
4 Illuminate\Database\Connectors\Connector::createConnection("mysql:host=192
.168.10.10;port=3306;dbname=aff", [])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\MySqlConnector.php:24
5 Illuminate\Database\Connectors\MySqlConnector::connect()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connectors\ConnectionFactory.php:183
6 Illuminate\Database\Connectors\ConnectionFactory::Illuminate\Database\Conn
ectors\{closure}()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:915
7 call_user_func(Object(Closure))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:915
8 Illuminate\Database\Connection::getPdo()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:940
9 Illuminate\Database\Connection::getReadPdo()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:399
10 Illuminate\Database\Connection::getPdoForSelect()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:325
11 Illuminate\Database\Connection::Illuminate\Database\{closure}("select * fr
om information_schema.tables where table_schema = ? and table_name = ?")
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:657
12 Illuminate\Database\Connection::runQueryCallback("select * from informatio
n_schema.tables where table_schema = ? and table_name = ?", Object(Closure))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:624
13 Illuminate\Database\Connection::run("select * from information_schema.tabl
es where table_schema = ? and table_name = ?", Object(Closure))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Connection.php:333
14 Illuminate\Database\Connection::select("select * from information_schema.t
ables where table_schema = ? and table_name = ?")
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Schema\MySqlBuilder.php:18
15 Illuminate\Database\Schema\MySqlBuilder::hasTable("migrations")
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Migrations\DatabaseMigrationRepository.php:169
16 Illuminate\Database\Migrations\DatabaseMigrationRepository::repositoryExis
ts()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Migrations\Migrator.php:545
17 Illuminate\Database\Migrations\Migrator::repositoryExists()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Console\Migrations\MigrateCommand.php:97
18 Illuminate\Database\Console\Migrations\MigrateCommand::prepareDatabase()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Database\Console\Migrations\MigrateCommand.php:63
19 Illuminate\Database\Console\Migrations\MigrateCommand::handle()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Container\BoundMethod.php:29
20 call_user_func_array([])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Container\BoundMethod.php:29
21 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Container\BoundMethod.php:87
22 Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Founda
tion\Application), Object(Closure))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Container\BoundMethod.php:31
23 Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Applic
ation), [])
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Container\Container.php:564
24 Illuminate\Container\Container::call()
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Console\Command.php:183
25 Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input
\ArgvInput), Object(Illuminate\Console\OutputStyle))
C:\Users\jarro\Documents\sites\aff\vendor\symfony\console\Command\Command.
php:252
26 Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Co
nsole\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Console\Command.php:170
27 Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\Arg
vInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\vendor\symfony\console\Application.php:
865
28 Symfony\Component\Console\Application::doRunCommand(Object(Illuminate\Data
base\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\
ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\vendor\symfony\console\Application.php:
241
29 Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Cons
ole\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\vendor\symfony\console\Application.php:
143
30 Symfony\Component\Console\Application::run(Object(Symfony\Component\Consol
e\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Console\Application.php:88
31 Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input
\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\vendor\laravel\framework\src\Illuminate
\Foundation\Console\Kernel.php:122
32 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Cons
ole\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
C:\Users\jarro\Documents\sites\aff\artisan:37