Posts By: S.S.Niranga
SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES)

When you try to run Magento 2 and If you get this error message, possible reason is wrong username or password.
You can change this by editing, below information.
Go to app folder > Etc > and open env.php
In this file, you can find below code section
array (
'host' => 'localhost',
'dbname' => 'magento2',
'username' => 'root',
'password' => '',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1',
)
Replace your database information.
How to Change database details in Magento 2
You can do this easily 🙂
Go to app folder > Etc > and open env.php
In this file, you can find below code section
array (
'host' => 'localhost',
'dbname' => 'magento2',
'username' => 'root',
'password' => '',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1',
),
Edit the details and add your database information.
That’s it 🙂
How to add another compass compiler to php storm
Recently I have updated my compass version to 1.0.3 and when I tried to compile my old projects with 1.0.3 compiler and it didn’t work.
Firstly, I couldn’t understand the issue, but after a few hours I figured it out it has something to do with my compiler.
So, I had two options left,
(more…)