Recently I have a trouble of accessing MySQL database on my macbook. The operating system that I use is MacOS Ventura. I installed MySQL through homebrew by using my terminal. But, when I tried to access the user and the root password, it says
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I tried to use sudo mysql
but my terminal says
Password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO).
I also tried using
ALTER USER 'root'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'your_new_password';
but it says zsh:
command not found: ALTER.