Last active
October 22, 2019 04:57
-
-
Save aamsur-mkt/9dbb30a0a868c86868f4d4e7f159ab53 to your computer and use it in GitHub Desktop.
Create user mysql
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
CREATE USER 'user'@'%' IDENTIFIED BY 'yourfpassword'; | |
GRANT SELECT ON *.* TO 'user'@'%'; | |
FLUSH PRIVILEGES; | |
# ALL PRIVILEGES- as we saw previously, this would allow a MySQL user full access to a designated database (or if no database is selected, global access across the system) | |
# CREATE- allows them to create new tables or databases | |
# DROP- allows them to them to delete tables or databases | |
# DELETE- allows them to delete rows from tables | |
# INSERT- allows them to insert rows into tables | |
# SELECT- allows them to use the SELECT command to read through databases | |
# UPDATE- allow them to update table rows | |
# GRANT OPTION- allows them to grant or remove other users’ privileges |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment