检查MariaDB的字符编码的方法是什么?

以下是确认MariaDB服务器字符编码的方法。

sudo mysql -uroot
>status

对于Ubuntu 20.04的情况,

MariaDB [(none)]> status
--------------
mysql  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Connection id:      77
Current database:   
Current user:       root@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server:         MariaDB
Server version:     10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
Protocol version:   10
Connection:     Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8mb4
Conn.  characterset:    utf8mb4
UNIX socket:        /var/run/mysqld/mysqld.sock
Uptime:         23 hours 13 min 50 sec

Threads: 7  Questions: 592  Slow queries: 0  Opens: 180  Flush tables: 1  Open tables: 32  Queries per second avg: 0.007
--------------

MariaDB [(none)]> 

在Raspbian下

MariaDB [(none)]> status
--------------
mysql  Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnueabihf (armv8l) using readline 5.2

Connection id:      40
Current database:   
Current user:       root@localhost
SSL:            Not in use
Current pager:      stdout
Using outfile:      ''
Using delimiter:    ;
Server:         MariaDB
Server version:     10.3.22-MariaDB-0+deb10u1 Raspbian 10
Protocol version:   10
Connection:     Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8mb4
Conn.  characterset:    utf8mb4
UNIX socket:        /var/run/mysqld/mysqld.sock
Uptime:         17 hours 14 min 21 sec

Threads: 7  Questions: 72  Slow queries: 0  Opens: 33  Flush tables: 1  Open tables: 27  Queries per second avg: 0.001
--------------

MariaDB [(none)]> 
广告
将在 10 秒后关闭
bannerAds