0

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.

James Z
  • 12,209
  • 10
  • 24
  • 44
Vonny
  • 1
  • Its becoming my catchphrase, but try using MySQL Workbench. Its possible to do command line work, but its like calculating numbers in a text file versus using Excel to do it. Download here -> https://dev.mysql.com/downloads/workbench/ – easleyfixed Jul 13 '23 at 16:21
  • I can't access MySQL Workbench too because it required me to enter the root password. I need to reset the root password, could you tell me how to do that on Mac? – Vonny Jul 13 '23 at 16:29
  • Man I don't know, the problem is that if its easy to do it, then MySQL has ZERO security as people could just reset it and defeat all of its systems. – easleyfixed Jul 13 '23 at 16:30
  • Have you try following the steps on the docs? https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html – Jorge Campos Jul 13 '23 at 16:33
  • Also check this link too --> https://stackoverflow.com/questions/16556497/mysql-how-to-reset-or-change-the-mysql-root-password What version are you using cause 5.* and 8.* have different abilities. – easleyfixed Jul 13 '23 at 16:55

0 Answers0