laravel mysql in_mysql - Laravel 5.2: PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] ...

-2

I got database connection error in laravel latest version (5.2).

PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) in Connector.php line 55 at PDO->__construct('mysql:host=127.0.0.1;port=3306;dbname=homestead', 'homestead', 'secret', array('0', '2', '0', false, false)) in Connector.php line 55

Here is .env file contents

DB_CONNECTION=mysql

DB_HOST=localhost

DB_PORT=3306

DB_DATABASE=simpletask

DB_USERNAME=root

DB_PASSWORD=''

also i am updating config.php file with the same as that of .env fileid't connect. I am a beginner of mysql server system . please help me how to connect step by step. mysql xampp

|

this question asked Apr 6 '16 at 12:31 Moniruzzaman Monir 1 The error message is quite self explanatory: eit

'mysql' => [

'driver' => 'mysql',

'host' => env('DB_HOST', 'localhost'),

'port' => env('DB_PORT', '3306'),

'database' => env('DB_DATABASE', 'simpletask'),

'username' => env('DB_USERNAME', 'root'),

'password' => env('DB_PASSWORD', ''),

'charset' => 'utf8',

'collation' => 'utf8_unicode_ci',

'prefix' => '',

'strict' => false,

'engine' => null,

]

php

mysql

pdo

|

this question asked May 5 '16 at 5:48

Blessan Kurien 696 8 26      Possible duplicate of

SQLSTATE[HY000] [2002] A connection attempt failed.. - When attempting to connect from Local to remote server –

e4c5 Jun 29 '16 at 3:24

|

1 Answers

1

if there is no password ,leave the password empty

DB_CONNECTION=mysql

DB_HOST=localhost

DB_PORT=3306

DB_DATABASE=simpletask

DB_USERNAME=root

DB_PASSWORD=

|

this answer answered May 5 '16 at 6:07

Moawia Meghari 120 7      Tried this,but didn't worked –

Blessan Kurien May 5 '16 at 6:09      witch program you use (xampp, wampp,mampp,...) ? –

Moawia Meghari May 5 '16 at 6:14      i am usingxampp:) –

Blessan Kurien May 5 '16 at 6:20 1   Problem solved i've restarted the dev server –

Blessan Kurien May 5 '16 at 6:41

|

in config directory to ' mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'wdcollect'), 'username' => env('DB_USERNAME', 'root

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值