#author("2023-07-07T11:13:18+09:00","default:kuji","kuji")
#author("2023-07-07T11:16:26+09:00","default:kuji","kuji")
CONTENTS
#contents
----
Lastmodified &lastmod;
----
*MariaDB Charactor set [#l380181d]
参考:[[MariaDB(MySQL)の文字コードを設定(変更)する:https://it-jog.com/db/mariadb/set-characode-onmariadb#:~:text=MariaDB%E3%81%AE%E6%96%87%E5%AD%97%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE,variables%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A7%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82&text=latin1%E3%82%84utf8mb3%EF%BC%88UTF8%EF%BC%89%E3%81%8C,%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E7%8A%B6%E6%85%8B%E3%81%A7%E3%81%99%E3%80%82]]

# mysql -u root -p

 root@localhost [(none)]> show variables like "character%";

|LEFT:Variable_name            | Value                          |h
| character_set_client     | utf8                             |
| character_set_connection | utf8                             |
| character_set_database   | latin1                           |
| character_set_filesystem | binary                           |
| character_set_results    | utf8                             |
| character_set_server     | latin1                           |
| character_set_system     | utf8                             |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
8 rows in set (0.026 sec)

 root@localhost [(none)]> show variables like "collation%";

| Variable_name        | Value             |h
| collation_connection | utf8_general_ci   |
| collation_database   | latin1_swedish_ci |
| collation_server     | latin1_swedish_ci |
3 rows in set (0.001 sec)



**設定ファイル作成・設置 [#q5f76adf]
/usr/local/etc/mysql/conf.d/MariaDB_Charactor_Set.cnf
 [mysqld]
 character-set-server=utf8mb4
 
 [client]
 default-character-set=utf8mb4


**設定後 [#gaa39141]
 "character%";
| Variable_name            | Value                            |h
| character_set_client     | utf8mb4                          |
| character_set_connection | utf8mb4                          |
| character_set_database   | utf8mb4                          |
| character_set_filesystem | binary                           |
| character_set_results    | utf8mb4                          |
| character_set_server     | utf8mb4                          |
| character_set_system     | utf8                             |
| character_sets_dir       | /usr/local/share/mysql/charsets/ |
8 rows in set (0.001 sec)

"collation%";
| Variable_name        | Value              |h
| collation_connection | utf8mb4_general_ci |
| collation_database   | utf8mb4_general_ci |
| collation_server     | utf8mb4_general_ci |
3 rows in set (0.001 sec)

----
Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS