Home > Backend Development > PHP Tutorial > When laravel5.3 runs data migration, the error is as follows:

When laravel5.3 runs data migration, the error is as follows:

WBOY
Release: 2023-03-01 18:50:01
Original
1056 people have browsed it

When laravel5.3 runs data migration, the error is as follows:

Supplementary question:
There is no problem reading the data. Configuration in
database.php

When laravel5.3 runs data migration, the error is as follows:

Configuration in

.env

When laravel5.3 runs data migration, the error is as follows:

Reply content:

When laravel5.3 runs data migration, the error is as follows:

Supplementary question:
There is no problem reading the data. Configuration in
database.php

When laravel5.3 runs data migration, the error is as follows:

Configuration in

.env

When laravel5.3 runs data migration, the error is as follows:

'default' => env('DB_CONNECTION', 'mysql'), will first find the DB_CONNECTION configuration in the .env file. If there is no DB_CONNECTION field in the .env, the second part of the env() function can be used by default Parameters as values, in .env you have set DB_CONNECTION=mysql, then it will go to connections to find the configuration with the key name 'mysql', and you changed the key name of 'mysql' to 'zcbo', Then you can’t find the mysql configuration. Either change the value of DB_CONNECTION in .env to zcbo, or change the zcbo in connections back to mysql. Since you are not familiar with laravel now, don’t take it for granted. to change some configurations, not to mention changing mysql in connections to zcbo. What does this mean?

Of course you can’t find it if you change mysql to zcbo. Since you changed it, you also changed the env file. You are also drunk

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template