|
|
楼主 |
发表于 2024-7-23 16:00:24
|
显示全部楼层
测试连接 带ip地址访问:
& `( z# i% ]3 H0 T* t. ? mysql -u victor -p
( f3 \" D) p6 R. D6 A2 Z' q( y3 TEnter password:
$ b/ D% \" U S" E" o& zWelcome to the MariaDB monitor. Commands end with ; or \g.
, G* o1 M" l8 n! e8 S7 OYour MariaDB connection id is 16
" t8 j3 Y, H6 e+ a4 O) m& i8 KServer version: 10.5.22-MariaDB MariaDB Server* q( d! N" b7 a; Z
# F) T7 A- f0 b- A5 ]
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.1 v \/ r2 |3 _. l- @. f2 G
) _% A7 H) b# zType 'help;' or '\h' for help. Type '\c' to clear the current input statement.' S0 f( Q- J1 R' F) j# G& S* W3 u
6 g+ X [6 A% t6 A: H1 M
MariaDB [(none)]> show databases;! M4 x1 ?) u9 \
+--------------------+; G. x% O, c/ K. |. v
| Database |# W# E) B- N" Y) s* @9 x
+--------------------+
3 R7 r5 |5 H+ j$ k' x8 Y. v- ?| information_schema |
$ L3 }, n) F5 N1 n8 _2 V& b ?0 K| restflask |
, {7 r3 _2 T) G i' f' m: P+--------------------+( a* u' B- t1 {) I& X8 m/ t
2 rows in set (0.001 sec)2 L9 W# W/ ]1 x- m" j# Y( L
# N1 j4 C: l v. z# q8 X m# ?- l- e3 M
MariaDB [(none)]> use restflask
8 i5 a5 Y' P7 B- kDatabase changed T3 E' q" @- W( W, C! j
MariaDB [restflask]> show tables;
& x' B0 I! w1 |Empty set (0.000 sec)
. x8 }9 C+ N c: O4 L( z
0 q+ {, b8 c4 P' g# s8 PMariaDB [restflask]> exit+ w y9 J; O" H5 s X: o
Bye. t# b: W+ b6 d+ N, F: U/ y6 k
[root@python-flask mysqlclient-2.2.4]# mysql -u victor -p -h 192.168.13.131" G0 w9 ]( y7 z( T% O$ B
Enter password:
& l" l( o3 U4 i# d6 Q% D+ C2 vWelcome to the MariaDB monitor. Commands end with ; or \g.
. x0 u6 m, P1 S3 RYour MariaDB connection id is 17
9 T6 o6 ~: R" G3 R5 gServer version: 10.5.22-MariaDB MariaDB Server, h$ ^, U* l) t. `1 A7 ^
1 M$ J3 g* M/ V3 G' HCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
4 p- ~5 R/ b" k; ?3 D n, `/ G( C# h4 d ~+ d% I
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
& Z+ L6 x8 O8 Y( w
& P' @9 g$ Z) uMariaDB [(none)]> exit9 Q( c1 j$ B/ ~% ^
Bye1 A4 ~" [6 Q4 d/ x% A
|
|