Created
June 16, 2014 08:58
-
-
Save geekdada/52f8b31f8a8c26047a6b to your computer and use it in GitHub Desktop.
新建一个 DB 并授权
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
DROP DATABASE IF EXISTS `<db name>`; | |
CREATE DATABASE `<db name>` | |
DEFAULT CHARACTER SET utf8 | |
DEFAULT COLLATE utf8_general_ci; | |
USE 'mysql'; | |
GRANT ALL PRIVILEGES ON <db name>.* TO '<username>'@'localhost' IDENTIFIED BY '<password>' | |
WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment