Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Latest commit

 

History

History
18 lines (14 loc) · 494 Bytes

mysql_grant_user.md

File metadata and controls

18 lines (14 loc) · 494 Bytes
$ mysql -u dbadmin -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 dbname;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON dbname.* TO "usertogrant"@"hote"
    -> IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
 
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)