Last active
October 21, 2016 00:48
-
-
Save omar-yassin/2784d1feb32882b40efec7f129dbd76c to your computer and use it in GitHub Desktop.
mysql change password for user & change grants to read only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use mysql; | |
| update user set password=PASSWORD('$new_password') where User='$user_name'; | |
| flush privileges; | |
| # to change current user grants | |
| revoke all privileges on *.* from 'user'@'%'; | |
| GRANT SELECT ON *.* TO 'user'@'%'; | |
| flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment