Created
July 5, 2013 08:52
-
-
Save ghooghe/5933051 to your computer and use it in GitHub Desktop.
How-To create a MySQL database and set privileges to a user
http://www.debuntu.org/how-to-create-a-mysql-database-and-set-privileges-to-a-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 root -p | |
| Enter password: | |
| mysql> create database amarokdb; | |
| Query OK, 1 row affected (0.00 sec) | |
| mysql> grant usage on *.* to amarokuser@localhost identified by ‘amarokpasswd’; | |
| Query OK, 0 rows affected (0.00 sec) | |
| mysql> grant usage on *.* to amarokuser@localhost identified by ‘amarokpasswd’; | |
| Query OK, 0 rows affected (0.00 sec) | |
| mysql> grant all privileges on amarokdb.* to amarokuser@localhost ; | |
| Query OK, 0 rows affected (0.00 sec) | |
| $ mysql -u amarokuser -p’amarokpasswd’ amarokdb | |
| Your MySQL connection id is 12 | |
| Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution | |
| Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer. | |
| mysql> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment