forked from xyz37/MySqlSimpleMembershipProvider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateUserAndDatabase.sql
59 lines (46 loc) · 1.48 KB
/
CreateUserAndDatabase.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
grant all privileges on
SimpleMembershipTest.* to
'dev'@'%' identified by
'thePassword' with grant option;
flush privileges;
use mysql;
select host, user from user where user = 'dev';
select host, user, db from db where user = 'dev';
/*
>mysql --user=root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> grant all privileges on
-> SimpleMembershipTest.* to
-> 'dev'@'%' identified by
-> 'thePassword' with grant option;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> use mysql;
Database changed
mysql> select host, user from user where user = 'dev';
+------+------+
| host | user |
+------+------+
| % | dev |
+------+------+
1 row in set (0.00 sec)
mysql> select host, user, db from db where user = 'dev';
+------+------+----------------------+
| host | user | db |
+------+------+----------------------+
| % | dev | simplemembershiptest |
+------+------+----------------------+
1 row in set (0.00 sec)
mysql>
*/