雿輻 root 脣 MySQL" u. F* Q8 Z! Y% J; y4 J
8 I% W! u; F5 ]& H+ r8 r
2 n2 k8 Q# K) o; H3 n6 r
4 s9 Q* r: a; N z, g) m乩靘啣銝雿輻刻 user1, 撖蝣潸身摰 user1pwd, 銝虫蝯虫鞈摨怎甈: G( k/ z/ x- y/ f, Q2 w8 \+ b
- use mysql;' s0 p& x3 `( m$ [/ h& y4 e* l
- 7 s+ t. v. S* R8 y
- INSERT INTO user(host,user,password) VALUES('%','user1',password('user1pwd'));
銴鋆賭誨蝣
0 \, Q F/ k# ^, f, |9 O憒閬蝯虫雿輻刻孵鞈摨怎鈭雿甈嚗
5 K# g6 Y0 r8 V6 |- GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣
; ?5 v/ S2 d$ q+ L, h, N蝯虫雿輻刻孵鞈摨怎雿甈嚗- GRANT all ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';5 s4 I" L; b7 R# v* J- T
銴鋆賭誨蝣
) ]% ]1 J& A0 c; b! B蝯虫雿輻刻鞈摨怎雿甈嚗
8 n' S4 w+ }7 A! k+ W# O- GRANT all ON *.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣 憪:3 F! L/ `2 i( N2 {4 c
$ n0 G3 z$ E5 x, V' L1 [4 v
|
|