|
|
楼主 |
发表于 2024-7-23 16:00:24
|
显示全部楼层
测试连接 带ip地址访问:# u! L2 C1 [' e
mysql -u victor -p
' W% {1 Z% o# G. s# t1 DEnter password:
# C. b# L5 [! IWelcome to the MariaDB monitor. Commands end with ; or \g.
. T9 q3 R" m' X! f6 g; [( vYour MariaDB connection id is 16
3 U0 v' O: B6 h% Y) s, tServer version: 10.5.22-MariaDB MariaDB Server, R8 s. v4 L, G6 s. I7 {& O( x5 K
$ v, g1 @. g( h. C" A: ZCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.( B. b9 z9 M" l6 X) R
. g4 T2 y7 m) b S0 q* d) b0 u1 c
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.2 E2 K3 {8 D$ D) ]
( X: G& ?; O8 F9 Q
MariaDB [(none)]> show databases; e0 F! Q6 @- {5 e# e/ N
+--------------------+& _9 A( w2 q# L* \
| Database |
3 `5 ~" I0 g6 e; m* o0 O- C+--------------------+
# w! T0 Z! f$ d| information_schema |2 U, g; V5 ?; w2 ]% t0 c0 b
| restflask |
8 {/ C" ^' m% {# K+--------------------+
+ X$ G* g U: I' H! J2 rows in set (0.001 sec); ^) q, n$ e& T; X/ [* z
; @6 c* Y. q$ [7 wMariaDB [(none)]> use restflask
0 E+ C9 u# c8 T: `: G% o5 H1 lDatabase changed
# O x4 @+ E EMariaDB [restflask]> show tables;
" h0 M6 _# R+ \+ u$ ~Empty set (0.000 sec)
* b- V- N6 k& L; I* U: S' ?* A% D* y) |" i: v; n4 h8 ~( _
MariaDB [restflask]> exit
: E0 E: U- j; b1 {" PBye
/ J: X, U v: C% w T! u2 M! N[root@python-flask mysqlclient-2.2.4]# mysql -u victor -p -h 192.168.13.1315 Z- C) D2 u4 p) n3 X, L
Enter password:
S, j7 w3 J! l4 Y: P" f) j* N+ tWelcome to the MariaDB monitor. Commands end with ; or \g.
I3 n# z0 g" f8 S, I8 c7 ZYour MariaDB connection id is 176 \! w, M% O3 A9 q" `" I. g
Server version: 10.5.22-MariaDB MariaDB Server4 y. B* t8 v! v8 B6 R' H3 R m" Q
, | I! |. g/ v! |
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.$ ]! [, E% [ v% M u' d
6 \) v$ a$ O! ?' K% ^. I6 w
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
5 r C O+ j+ F/ n4 S2 e: ]/ J% I4 _. ~! u! y
MariaDB [(none)]> exit+ }# \5 E+ ^. Z! A$ q k0 b7 E( O
Bye
/ {- J5 Q; S! ^' q |
|