pdo - Laravel using non-existent DB settings and failing with PDOException (1045). How? Why? -



pdo - Laravel using non-existent DB settings and failing with PDOException (1045). How? Why? -

i'm starting aravel4 project needs connect pre-existing database. i've set env 'local' => array('*.dev'), , hitting project via http://my.project.dev/products.

my app/config/database.php intentionally incomplete, , looks exactly this:

'mysql' => array( 'driver' => 'mysql', 'host' => '192.168.1.250', 'database' => '', 'username' => '', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => 'm3_', ),

my app/config/local/database.php looks this:

'mysql' => array( 'driver' => 'mysql', 'host' => '192.168.1.250', 'database' => 'realdbname', 'username' => 'realusername', 'password' => 'realpass', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => 'm3sandbox_', ),

yet, error beingness thrown saying application trying connect my outward facing ip (not localhost loopback) www-data user:

pdoexception (1045) sqlstate[28000] [1045] access denied user 'www-data'@'192.168.1.175' (using password: no)

i boggled. default trying use, , heck getting from? more importantly, how right this?

well, turns out reply environments. seems weird fallback thrown exception referring 'www-data'@'192.168.1.175', alas, problem triggered empty credentials in app/config/database.php , misconfigured local environment attribute.

in case helps else, remember, environments matching machine names. reason, had in head pattern matching against url requested :|

laravel pdo eloquent

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -