雿輻 root 脣 MySQL( H# g, T$ ^( ^6 O; U1 C
5 ^6 G) }( a) Y0 y0 l& b8 S$ e3 ~
$ [- [% `2 y D6 v/ g% s' ]2 m- ], X6 d: L, p
乩靘啣銝雿輻刻 user1, 撖蝣潸身摰 user1pwd, 銝虫蝯虫鞈摨怎甈2 f* [, g' v' V( q; U
- use mysql;( [+ \4 g9 L, @ x
-
0 o7 P2 I9 y: h - INSERT INTO user(host,user,password) VALUES('%','user1',password('user1pwd'));
銴鋆賭誨蝣 0 f+ \+ s$ O$ W1 P/ ~, l
憒閬蝯虫雿輻刻孵鞈摨怎鈭雿甈嚗
8 O; P" }2 a3 m3 L- GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣
+ v% p& O) @2 W# k$ z蝯虫雿輻刻孵鞈摨怎雿甈嚗- GRANT all ON dbname.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd'; b% C: ^3 C: ?' ]
銴鋆賭誨蝣
( Q0 p2 _1 O4 J蝯虫雿輻刻鞈摨怎雿甈嚗
4 m6 K, @7 `( C" s2 f1 T- GRANT all ON *.* TO 'user1'@localhost IDENTIFIED BY 'user1pwd';
銴鋆賭誨蝣 憪:) s4 a4 N7 g" H
4 k: }$ ^- [# \; p
|
|