Created
December 27, 2011 03:02
-
-
Save aoberoi/1522605 to your computer and use it in GitHub Desktop.
MySQL New Database/User
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
$ mysql -u adminusername -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 5340 to server version: 3.23.54 | |
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. | |
mysql> CREATE DATABASE databasename; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" | |
-> IDENTIFIED BY "password"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> FLUSH PRIVILEGES; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> EXIT | |
Bye | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment