I have installed mysql in mac big sur using homebrew as
brew install mysql
But during the
GRANT ALL PRIVILEDGE
I mistakenly gave some other password to root and thus not able to start mysql again.
Tried all the steps/ suggestions for this question all over stack-overflow and blogs but did not get full steps anywhere (probably I might have missed it somewhere)
I tried to stop mysql and then start with --skip-grant-tables but it is still giving me same error for the second command.
Tried uninstalling and reinstalling but upto no progress so far
By going through multiple answers I found this steps which worked for me
Mac OS: Big Sur 11.6.8 MySQL: 8.0.30
Steps:
brew uninstall mysql
brew install mysql
/usr/local/etc/my.cnf
[mysqld]
skip-grant-tables
(You might already have the "mysqld" section so just add the line below it)
mysql.server stop
mysqld_safe --skip-grant-tables --skip-syslog --skip.networking
mysql -u root
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.