Reputation: 553
I tried changing MySQL root password right after installing it. Now on terminal, it says to check out some newer query ALERT USER
. I checked the documentation, but it's still the old query CHANGE PASSWORD
Any help please
Upvotes: 0
Views: 1060
Reputation: 57
If anyone has trouble with the mysql -u root -p
command but know the current MySQL password and has MySQL Workbench installed, just try to start a command line client by right clicking your localhost connection in MySQL Workbench:
Once the command line client started, enter your current MySQL password when prompted in terminal. After that, use the ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'
command.
Using Mac M1 MacBook and mysql version 8.0.30
Upvotes: 1
Reputation: 11
instruction that worked with my case.
mysql -uroot -p (default root password is blank with brew install)
That's it. ( Mac M1 MacBook, mysql installed with brew, mysql version 8.0.28 for macos12.0 on arm64 (Homebrew) )
Upvotes: 1
Reputation: 553
Ok i found a way to change the root password from workbench i just clicked on "local instance 3306" in the home page and gave me a choice to change root password, it's even easier than changing it from the terminal !
Upvotes: 2