Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alimranahmed/3056dbd0f143ff205369ef941655d238 to your computer and use it in GitHub Desktop.
Save alimranahmed/3056dbd0f143ff205369ef941655d238 to your computer and use it in GitHub Desktop.
Scripts

To access from remote

mysql –u root -p
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

For changing from sudo accessible to password accessible(auth_socket to mysql_native_password)

mysql –u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment