|
|
楼主 |
发表于 2024-7-23 16:00:24
|
显示全部楼层
测试连接 带ip地址访问:
5 U" Z4 O9 \2 m1 c mysql -u victor -p! P6 z% m" q/ `) U" J4 l
Enter password: & @. x# x" x0 U, c H
Welcome to the MariaDB monitor. Commands end with ; or \g.
' P! o; @7 A, ?5 H+ K4 RYour MariaDB connection id is 16
9 Y/ @; u: s) W$ o5 b$ g2 tServer version: 10.5.22-MariaDB MariaDB Server9 T! y0 {- r d
0 o: W2 k3 N. n0 _Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
/ Y5 }; H* Y6 i s, [2 r' S9 M5 e1 x, G3 S+ m
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
4 e0 _- d" t9 H# P* B) B1 H, D' N: m0 S) y( w6 R$ L) z
MariaDB [(none)]> show databases;
1 Q8 t. ^3 r# ~- o- Q7 n+--------------------+& ?" v, Z [4 d- P9 K/ Q1 G+ {% |
| Database |
/ p* f# m2 [- c1 n+--------------------+
3 n% n3 a5 m- O& L% r6 E| information_schema |6 ?+ Z: i- O) _+ i5 c' a
| restflask |
2 ^! d7 P$ m$ d) \5 M% T+--------------------+
( {4 V; p! L0 m) U( a% ?1 R3 @2 rows in set (0.001 sec)4 p# y. i2 D: j8 y+ P. w0 O8 T
: R0 U- ~ y3 J4 e$ g7 xMariaDB [(none)]> use restflask3 Q3 o; M) f; [( Z% Z* J" e
Database changed
, l- Y/ s: ?* l# O; ZMariaDB [restflask]> show tables;
8 _; s& a( R1 @6 EEmpty set (0.000 sec)
, [) Z( V! k I7 H/ |6 F" @. R' H1 W! H6 C/ \+ F1 I& ?
MariaDB [restflask]> exit
& F! F5 v7 V1 n6 n% [" K3 aBye# p8 z4 V8 s# T7 `7 _
[root@python-flask mysqlclient-2.2.4]# mysql -u victor -p -h 192.168.13.131
. x* G0 k0 a" K# _3 REnter password:
; p3 g0 ^+ y7 _4 Z9 [, J' wWelcome to the MariaDB monitor. Commands end with ; or \g.
( z6 X( D# b4 f! vYour MariaDB connection id is 17& N; k" Z* V# H7 m8 U. ~
Server version: 10.5.22-MariaDB MariaDB Server
: R9 {- u; f# a6 Z9 [0 ?; U1 H9 W2 J8 n: |! S" u
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.) `( t/ K7 x+ y1 i' M, C
' \" x8 ]. Y ]$ V
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
) p+ O7 a X( l j, q' z8 g8 V. W% A6 v7 E$ |/ f
MariaDB [(none)]> exit
; a0 _4 B F& fBye
& F$ S. l0 a# j0 i/ x |
|