I installed mySQL using Homebrew and used it without password. But when I tried to access again it returned,
mysql -u root -p
mysql: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
when using without the password. And returned
mysql -u root -p
mysql: [Warning] World-writable config file '/etc/my.cnf' is ignored.
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
when using the password.
How to solve this issue?