MySQL Error - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I was able to make it work using the config editor.

From terminal:

mysql_config_editor set --login-path=local --host=localhost --user=root --password