Created
June 15, 2020 20:13
-
-
Save MrChrisWeinert/771de54f1c5635b0d5e988c63b7013f4 to your computer and use it in GitHub Desktop.
Generic mysql permission stuff (mostly for Wordpress)
This file contains 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
connect: | |
sudo mysql --user=root | |
Show users and where they can connect from: | |
SELECT user,host FROM mysql.user; | |
Show user-specific privileges: | |
SHOW GRANTS FOR 'user'@'192.168.x.xx'; | |
Update user privileges: | |
GRANT SELECT, INSERT, UPDATE, DELETE, ALTER ON `thisismydatabasename`.* TO `user`@`192.168.x.xxx`; | |
Persist changes (may be unnecessary) | |
flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment