Support the ongoing development of Laravel.io →
Installation Configuration Database
Last updated 1 year ago.
0

In my database.php


	'default' => 'mysql',

	/*
	|--------------------------------------------------------------------------
	| Database Connections
	|--------------------------------------------------------------------------
	|
	| Here are each of the database connections setup for your application.
	| Of course, examples of configuring each database platform that is
	| supported by Laravel is shown below to make development simple.
	|
	|
	| All database work in Laravel is done through the PHP PDO facilities
	| so make sure you have the driver for your particular database of
	| choice installed on your machine before you begin development.
	|
	*/

	'connections' => [

		'sqlite' => [
			'driver'   => 'sqlite',
			'database' => storage_path().'/database.sqlite',
			'prefix'   => '',
		],

		'mysql' => [
			'driver'    => 'mysql',
			'host'      => env('DB_HOST', 'localhost'),
			'database'  => env('DB_DATABASE', 'demol5'),
			'username'  => env('DB_USERNAME', 'root'),
			'password'  => env('DB_PASSWORD', ''),
			'charset'   => 'utf8',
			'collation' => 'utf8_unicode_ci',
			'prefix'    => '',
			'strict'    => false,
		],
Last updated 8 years ago.
0

Still get an error


exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)' in C
:\xampp\htdocs\laravel\demo-l5\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:47
Stack trace:
0

If you used php -S or php artisan serve, you need to restart your php built in server after updating .env file. To be sure, clear the cache.

0

@beanmoss

thanks for the hint, I will check Aptana cache.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

hayahay hayahay Joined 3 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.