I\'m setting up a new server and keep running into this problem.
When I try to login to the MySQL database with the root user, I get the error:
No need of sudo
The database is initialised with 2 all-privilege accounts: the first one is "root" which is inaccessible and the second one with your user name (check with command whoami
).
To enable access to root account, you need to login with your user name
mysql -u $(whoami)
and manually change password for root
use mysql;
set password for 'root'@'localhost' = password('YOUR_ROOT_PASSWORD_HERE');
flush privileges;
quit
Login as 'root'
mysql -u root -p