mysql access denied for user ''@'localhost' code example
Example 1: mysql access denied for user 'root'@'localhost'
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
Example 2: windows error 1045 (28000): access denied for user 'root'@'localhost' (using password: yes)
update user set authentication_string=password('my_password') where user='root';