Last active
December 20, 2015 01:49
-
-
Save hktonylee/6052361 to your computer and use it in GitHub Desktop.
MySQL Basic Operations
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 | |
mysql -uroot -e "create user '$YOUR_NAME'@'localhost' identified by '$YOUR_PASS'" | |
# create database | |
mysql -uroot -e "create database $YOUR_DB_NAME character set utf8 collate utf8_general_ci;" | |
# grant privileges | |
mysql -uroot -e "grant all privileges on $YOUR_DB_NAME.* to '$YOUR_NAME'@'localhost' with grant option;" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment