Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database connection [mysql] not configured. #1

Open
dev-jet opened this issue Feb 6, 2023 · 2 comments
Open

Database connection [mysql] not configured. #1

dev-jet opened this issue Feb 6, 2023 · 2 comments

Comments

@dev-jet
Copy link

dev-jet commented Feb 6, 2023

php artisan migrate

InvalidArgumentException

Database connection [mysql] not configured.

at C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:152
148▕ // If the configuration doesn't exist, we'll throw an exception and bail.
149▕ $connections = $this->app['config']['database.connections'];
150▕
151▕ if (is_null($config = Arr::get($connections, $name))) {
➜ 152▕ throw new InvalidArgumentException("Database connection [{$name}] not configured.");
153▕ }
154▕
155▕ return (new ConfigurationUrlParser)
156▕ ->parseConfiguration($config);

1 C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:115
Illuminate\Database\DatabaseManager::configuration("mysql")

2 C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:86
Illuminate\Database\DatabaseManager::makeConnection("mysql")

@dev-jet
Copy link
Author

dev-jet commented Feb 7, 2023

vladi@DESKTOP-TBKR7F7 C:\xampp\htdocs

php artisan migrate

InvalidArgumentException

Database connection [mysql] not configured.

at C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:152
148▕ // If the configuration doesn't exist, we'll throw an exception and bail.
149▕ $connections = $this->app['config']['database.connections'];
150▕
151▕ if (is_null($config = Arr::get($connections, $name))) {
➜ 152▕ throw new InvalidArgumentException("Database connection [{$name}] not configured.");
153▕ }
154▕
155▕ return (new ConfigurationUrlParser)
156▕ ->parseConfiguration($config);

1 C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:115
Illuminate\Database\DatabaseManager::configuration("mysql")

2 C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Database\DatabaseManager.php:86
Illuminate\Database\DatabaseManager::makeConnection("mysql")

@dev-jet
Copy link
Author

dev-jet commented Feb 7, 2023

The .env file is configured. What could be the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant