Skip to content

Instantly share code, notes, and snippets.

@himan72
Forked from stefanbauer/fix_mysql_big_sur.sh
Created February 9, 2021 08:00
Show Gist options
  • Save himan72/77e6d84cf72670801cb7b6b4f716c194 to your computer and use it in GitHub Desktop.
Save himan72/77e6d84cf72670801cb7b6b4f716c194 to your computer and use it in GitHub Desktop.
Fix MySQL 5.7 ERROR 1524 (HY000): Plugin ‘auth_socket’ is not loaded in macOS Big Sur
# If you don't use brew services, install it
# https://github.com/Homebrew/homebrew-services
# Stop MySQL
brew services stop mysql@5.7
# Start MySQL in safe mode
mysqld_safe --skip-grant-tables &
# Login to MySQL
mysql -u root
# Use "mysql" table
use mysql;
# Update the authentication
update user set authentication_string=PASSWORD('') where User='root';
update user set plugin='mysql_native_password' where User='root';
# Flush the privilges and quit
flush privileges;
quit;
# Restart MySQL
/usr/local/opt/mysql@5.7/bin/mysql.server stop
brew services start mysql@5.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment