|
|
楼主 |
发表于 2020-5-7 17:00:01
|
显示全部楼层
mysql> use mysql& h u. ]2 }- u' n0 z4 ?
Reading table information for completion of table and column names
# t5 U' o- N# B4 @, h) tYou can turn off this feature to get a quicker startup with -A
, `- R2 L! ?( w0 gDatabase changed! Y1 G' b) @7 t* f3 P# k
mysql> select Host,User from user;
$ ^; U% N; \: b# N+-------------------+------------+2 O9 z3 o/ m/ [- [ i
| Host | User |
$ q$ z M/ T a, E% B+-------------------+------------+
9 Y# G: y4 z7 Y2 X) E) C7 f| 127.0.0.1 | root |$ K N" z3 m4 S/ O# I" S, L
| localhost | |( r! o8 I; q3 k7 q
| localhost | root |
2 p+ ~9 ]0 u9 ^6 s0 l+ e# |, u| localhost.example | |
0 f: ?& b' T" E( w6 }/ o* d* D( || localhost.example | root |
$ L7 u) ?* U2 v$ u/ j+-------------------+------------++ {5 p$ F% z7 @, `$ @1 G
11 rows in set (0.00 sec)
" X( k2 t& Z6 }4 umysql> delete from user where Host='localhost.example';$ O! G4 B5 _. Q
Query OK, 2 rows affected (0.00 sec)1 W, \3 n o$ s) z" L
mysql> select Host,User from user;
0 x: P' |, c! g+ @& e3 a F+--------------+------------+
, A! M/ L# F g1 o F$ `' e| Host | User |: d6 d8 Q" z1 f# E% M2 \
+--------------+------------+
3 ^: `. g! t- a) B8 K| 127.0.0.1 | root |! A8 D' R5 a. M# ]
| localhost | |, _' G8 [7 \, ^# j2 p
| localhost | root |3 i Q, w. q8 P4 I+ U( p
+--------------+------------+
) i, x8 E. s# Z# ]9 rows in set (0.00 sec)7 x6 p' t" W8 M d* \' S
mysql> delete from user where User='' ;
* t& |% G1 W; X3 s2 _Query OK, 1 row affected (0.00 sec)
2 O! A0 V$ H# Q1 m+ s/ E$ \mysql> select Host,User from user;- j5 h- N; {* q! }; E$ u8 }5 p
+--------------+------------+/ T r- A W! R4 W R2 U; f6 e
| Host | User |# r. R8 ^' C. ]* S6 R* p) P% I
+--------------+------------+
& P" E" j# @" \7 a, G- Z| 127.0.0.1 | root |( l4 q6 o* j0 e" x* [8 z* q; ]3 \/ y
| localhost | root |
1 x3 @+ y4 ?3 b) d! m+--------------+------------+# Z2 }4 N! j& T- Y/ E1 N
8 rows in set (0.00 sec)
' c1 y$ s) S6 q |
|