SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) 0


1

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 0


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 🙂

Introduction to Magento 2 0


Magento 2 is going to be released in early 2016 with new architectural and functional improvements. You can try community edition freely from git hub. (git link) Followings are some new features available in community edition.

  • Bootstrap for autoloading.
  • Dependancy Injection for object loading.(DI) Factory methods are no longer exists.
  • Zend 2.
  • New module structure. All blocks / layouts / templates are in same folder.
  • Core was completely removed. Adminhtml was replaced by backend.
  • core_resource table was replaced by setup_module.
  • Unlimited theme fallback. Introduced in CE 1.6 upward. theme.xml under design theme etc folder.
  • Full page cache.
  • Built in varnish cache.
  • Less for css.
  • Built in less compiler.
  • Layout files can be extended instead of copying all contents.
  • Composer for php dependancy management.

It gives significant performance improvements with all these features. And there are more customization options are available with minimum conflicts. Plugins and Preferances are major customization options they added. Plugins allow us to intercept method call and Preferances allow to change run time class in DI. Also it gives more flexible customizations with DI by changing constructor params via di.xml. Indexed php is no longer exsists, it uses bin/magento to achive all shell functions like indexing, log cleaning etc. Also there some new functions available through magento. Follwing diagram shows general process flow of Magento2.

 

arc

How to add another compass compiler to php storm 0


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,
Continue Reading