Skip to content

Instantly share code, notes, and snippets.

@aamsur-mkt
Last active October 22, 2019 04:57
Show Gist options
  • Save aamsur-mkt/9dbb30a0a868c86868f4d4e7f159ab53 to your computer and use it in GitHub Desktop.
Save aamsur-mkt/9dbb30a0a868c86868f4d4e7f159ab53 to your computer and use it in GitHub Desktop.
Create user mysql
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