|
|
楼主 |
发表于 2024-7-23 16:00:24
|
显示全部楼层
测试连接 带ip地址访问:
+ u0 i1 L% s u mysql -u victor -p
1 G# J3 d' q, HEnter password: ( X6 d& n+ @/ A
Welcome to the MariaDB monitor. Commands end with ; or \g.
& G' N( u5 a1 p3 oYour MariaDB connection id is 16
0 g5 O& E/ B3 bServer version: 10.5.22-MariaDB MariaDB Server9 \' U! x: z% H B$ h* d
; O% z1 N7 z% c0 y, M$ pCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
" Q2 T+ t. Z1 R( R! H$ p- T! u
2 }% y# }" i: n, E7 D: ~! T$ YType 'help;' or '\h' for help. Type '\c' to clear the current input statement.. ^# q u8 r6 j a$ ]2 V
/ Y( s% @& Q" B; n8 z+ f0 f
MariaDB [(none)]> show databases;; \2 w1 h/ b; t& v2 u
+--------------------+
1 _& N7 a& v! ?8 m| Database |8 j [1 Q5 \5 L$ p l4 |
+--------------------+
2 {" A6 C" ~! Q6 t| information_schema |
& D+ i( J4 E0 l/ f| restflask |
: W& B6 s: Y5 w/ o+--------------------+
2 `& T7 x( A, C) A7 k$ `5 f% Y2 rows in set (0.001 sec)
; B) @$ P- N- j5 n+ R/ J: v0 r- l. n8 l0 i6 ?
MariaDB [(none)]> use restflask' |. d5 z# o6 W7 ]
Database changed
$ D* B. m7 I: W+ j" B# F0 O$ d; PMariaDB [restflask]> show tables;
' t4 E& d7 `" O7 x* iEmpty set (0.000 sec)
3 Z6 d! {, r$ t
0 ?/ Y; _) D1 s0 q( P6 |MariaDB [restflask]> exit- b5 h9 w9 x7 x; W3 |* D6 ?8 l
Bye. N b$ U' m# {2 h# i; q
[root@python-flask mysqlclient-2.2.4]# mysql -u victor -p -h 192.168.13.131
3 T# @& p/ v4 HEnter password:
9 R: m; i3 C ]2 d' E5 U/ OWelcome to the MariaDB monitor. Commands end with ; or \g.
" @) Z$ ]3 q2 T& x( bYour MariaDB connection id is 17$ g' R2 S& c+ T
Server version: 10.5.22-MariaDB MariaDB Server
0 M6 y4 n- |) m5 @) w5 M g ~+ R( `. G
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.& q* [' Y0 }0 N* |% O' x
9 T% P, d7 I" W8 Q9 f
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.! z. ?3 g* s0 \
' n( B8 a+ S o4 l6 D, T; Z4 t/ IMariaDB [(none)]> exit
# Q+ v+ x2 R/ X$ w% a9 tBye& L4 r2 L. p) y" L4 t
|
|