Last active
July 8, 2019 11:08
-
-
Save Hazem-Ben-Khalfallah/a5fbbc7d10e90373ad99ddf26f5984d6 to your computer and use it in GitHub Desktop.
[DB schema and privileges] #sql #mysql
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
#connect to mysql | |
mysql -u root -p | |
#list privileges | |
select user,host from mysql.user; | |
# create new schema | |
CREATE SCHEMA `[SCHEMA_NAME]` DEFAULT CHARACTER SET utf8; | |
# grant acess on schema to user | |
GRANT ALL ON `[SCHEMA_NAME]`.* TO '[DB_USER]'@'%'; | |
flush privileges; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment