0

I'm on a Ubuntu 15.10 Yosemite using Laravel 5.2.*

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

    '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] Access denied for user 'homestead'@'localhost' (using password: YES)

Help me please!

Jose Rojas
  • 3,490
  • 3
  • 26
  • 40
NamAvar
  • 3
  • 4
  • are you able to connect to mysql via terminal\ using the above credentials ? – jaysingkar Aug 09 '16 at 20:47
  • it looks like your hitting a completely different DB etc as its mentions a homestead user, not the root user you have on your env file? Are you running homestead enviroment? Also have you added the actual root and password to mysql as a new user. Try the details via terminal or sequel pro etc – Simon Davies Aug 09 '16 at 21:00

2 Answers2

0

First glance conclusion: The app you're trying to load in the browser is not using the info in the .env and database.php files you're looking at.

Are you accessing the correct URL? Aren't you trying to access a vanilla Laravel installation in a different folder? A fresh install of 5.2 has homestead as username.

Check your url Check your virtualHost directory. Is the correct path used?

Stretsh
  • 193
  • 1
  • 12
0

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');
}
NamAvar
  • 3
  • 4