Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

you should duplicate database config on the local folder. That's what it is used for. local configs under /config/local folder

Last updated 2 years ago.
0

Thanks paparts, I tried that also before coming here and if I use my hostname I get a blank white screen, but if I use localhost instead of my hostname laravel gives me an error Database[] not configured. I am following one of Jeffry Way's tutorials and I did it exactly how he did, except he threw away his database.php file in his local folder, but I renamed mine instead.

The connection works if I use my credentials directly in the file though. but only in the database file that is not in the local folder and if I put my credentals in the file in the local folder I get the above error Database[] not configured.

Last updated 2 years ago.
0

Nevermind, I solved it. I forgot to add my port. :-)

'mysql' => array(
			'driver'    => 'mysql',
			'host'      => getenv('DB_HOST'),
			'database'  => getenv('DB_NAME'),
			'username'  => getenv('DB_USERNAME'),
			'password'  => getenv('DB_PASSWORD'),
			'charset'   => 'utf8',
			'collation' => 'utf8_unicode_ci',
			'prefix'    => '',
			'port'=>'33060'
		),

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dlmcglone dlmcglone Joined 3 Feb 2014

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.