Skip to content

Instantly share code, notes, and snippets.

@ykocaman
Created March 5, 2020 10:39
Show Gist options
  • Save ykocaman/ad0bcaa0cd0924d006253cd024367bcb to your computer and use it in GitHub Desktop.
Save ykocaman/ad0bcaa0cd0924d006253cd024367bcb to your computer and use it in GitHub Desktop.
MYSQL-SERVER >= 5.7
sudo mysql -uroot -p
USE mysql;
UPDATE user SET authentication_string=PASSWORD('YOUR_PASSWORD') WHERE User='root';
UPDATE user SET plugin="mysql_native_password";
FLUSH PRIVILEGES;
quit;
MYSQL-SERVER < 5.7
sudo mysql -uroot -p
USE mysql;
UPDATE user SET password=PASSWORD('YOUR_PASSWORD') WHERE User='root';
UPDATE user SET plugin="mysql_native_password";
FLUSH PRIVILEGES;
quit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment