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)]>