SQLSTATE [28000] [1045]用户'homestead'@'localhost'的访问被拒绝(使用密码:是) [英] SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
本文介绍了SQLSTATE [28000] [1045]用户'homestead'@'localhost'的访问被拒绝(使用密码:是)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用Laravel 5.2的Ubuntu 15.10 Yosemite.*
I'm on a Ubuntu 15.10 Yosemite using Laravel 5.2.*
这是我的.env文件:
Here is my .env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Pastry
DB_USERNAME=root
DB_PASSWORD=243320
app \ config \ database.php
app\config\database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'Pastry'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', '243320'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
当我收到消息时,成员:
emember when I got the message:
SQLSTATE [28000] [1045]用户'homestead'@'localhost'的访问被拒绝(使用密码:是)
SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
请帮助我!
推荐答案
感谢您的指导. 我无权访问数据库. 但是,迁移的建设工作正常进行. 但是我不能运行它进行测试运行:
Thank you for your guidance. I do not have access to the database. But the construction of migrations was run properly. But I can not run it for a test run:
public function index()
{
$com = new Categorys();
$com->name = 'ali';
$com->ename = 'hi';
$com->img = 'sdjf';
$com->save();
// return View('category.index');
}
这篇关于SQLSTATE [28000] [1045]用户'homestead'@'localhost'的访问被拒绝(使用密码:是)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文