Mariadbのconfファイル

# cat /etc/my.cnf

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[root@www ~]# ll /etc/my.cnf.d/
合計 8
-rw-r–r– 1 root root  232 11月 20 21:28 2013 mysql-clients.cnf
-rw-r–r– 1 root root 1033 12月 19 06:43 2013 server.cnf

[root@www ~]# cat /etc/my.cnf.d/server.cnf

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]
character-set-server=utf8
# this is only for embedded server
[embedded]

# This group is only read by MariaDB-5.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don’t understand
[mysqld-5.5]

# These two groups are only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

[mariadb-5.5]

以上のようになるのだが、/etc/my.cnf.d/server.cnfに色々書くみたいだな。今回はmysqlセクションにUTF-8をかいた。上に英語で説明文がかいてあるね。サンプル自体はどこかネットにおちているだろう。