雿輻 root 脣 MySQL
" B$ i0 O A1 g( W# G: U5 L, m% M# s. x, [* y0 D* m7 g% u: s1 `
- W4 U8 Z. w5 ~3 |9 Y
! c' ]9 V% V' |! D0 V6 M乩靘啣銝雿輻刻 user1, 撖蝣潸身摰 user1pwd, 銝虫蝯虫鞈摨怎甈# C$ h$ Y" M' Z: r) w9 C
- use mysql;5 U7 W4 a, d* }: S# Y; m
- 6 h" y. K9 u( S6 h9 G8 G, t: O
- INSERT INTO user(host,user,password) VALUES('%','user1',password('user1pwd'));
銴鋆賭誨蝣 ' C; l! [- x& C* Z: l6 Q9 r& b* V
憒閬蝯虫雿輻刻孵鞈摨怎鈭雿甈嚗
; Y' R/ p4 d- {1 n# w8 @8 p: b- GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣 7 g6 N# V& A" D! h+ G0 [. D! d# ?. v
蝯虫雿輻刻孵鞈摨怎雿甈嚗- GRANT all ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';: P2 c* k% B% e0 c1 u% C/ ]
銴鋆賭誨蝣
; l# } _# G. U; S( x" k蝯虫雿輻刻鞈摨怎雿甈嚗3 @5 e G! q- O" U( A5 t( \
- GRANT all ON *.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣 憪:$ ^1 @9 I- d3 f% E
/ Q. S/ J+ ]. n# e8 \4 p, a |
|