title: laravel 5 - when trying to retrive data from phpmyadmin: SQLSTATE HY000 1698 Access denied for user 'root'@'localhost'
body: <p>That's my first post - I hope my problem explanation will be easy to understand. I just started with Laravel5. </p>
  
  <p>I want to retrive data from mysql database that was successfully created using migrations. I'm following laracast series. I created route, controller and view to display the data. Unfortunatelly, when I enter browser to see it, I constantly get this error:</p>
  
  <pre><code>`SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'`
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/5nqK6.png" rel="nofollow">enter image description here</a></p>
  
  <p>My .env and database.php files are configured. Also, I can do migrations with no error (and I see result in phpmyadmin to which I can log in). When I type php artisan tinker, I can do various operations on my databases. The problem arises only when I want to display data in my laravel site.</p>
  
  <p>I did vast research of the problem and tried numerus tips like:</p>
  
  <p>1.change local host to 127.0.0.1</p>
  
  <p>2.change my database login and pass for homeostead, secret</p>
  
  <p>3.I did </p>
  
  <pre><code>`GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY     'Your_Password';`
  </code></pre>
  
  <p>When I type <code>mysql --user=root -p</code> I can log in but command <code>show databases</code> acts like never ending and shows nothing.</p>
  
  <p>and other ...</p>
  
  <p>Now, I'm at loss for ideas what to do next, please help me. I will appreciate that a lot cos I'm really stucked at this point!</p>
  
  <p>my .env file:</p>
  
  <pre><code>`DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=laravel
  DB_USERNAME=root
  DB_PASSWORD=haslo`
  </code></pre>
  
  <p>I use homeostead and Laravel 5 on Windows 7
  Server type: MySQL5.7.15
  PHP version: 7.1
  Apache/2.4.23, PHP/7.1</p>