(C) 2005 by Julia Dubenskaya (julia@cryptocom.ru) and Sergei Vyshenski (svysh@cryptocom.ru) for OpenCA project. This document can be modified and redistributed along the terms of the GNU Free Documentation License 1.2 (or newer) You can obtain a copy at http://www.gnu.org/licenses/fdl.txt This HOWTO-MySQL-UTF8 text says how to enable processing of UTF8-encoded data in MySQL database. It is meant for persons that are confortable with MySQL and are concerned with just enabling UTF8 support on data level. It says nothing about change of the interface language. ================================================ UTF8 support in MySQL To provide utf8 support in MySQL databases it is necessary to explicitly define database default charset in configuration file. The example below implies use of FreeBSD-5.4 and MySQL-4.1.13 suite installed from FreeBSD ports collection, but basic idea is universal. If you already have pre-installed MySQL suite then: 1) stop MySQL server 2) go to point 3 below. To install MySQL suite anew, proceed as follows. To create a new MySQL database you should: As root ####### 1. Install the following ports for MySQL suite (from /usr/ports/databases/): mysql41-server mysql41-client 2. Install the following ports to enable access from perl modules to postgre (from /usr/ports/databases/): p5-DBI p5-DBD-mysql41 3. Create a new directory for mysql databases: mkdir /var/db/mysql cd /var/db chown mysql:mysql mysql chmod 700 mysql 4. Create a new configuration file /usr/local/etc/my.cnf with lines: [mysqld] default-character-set=utf8 5. Edit file /etc/rc.conf to include lines: mysql_enable="YES" mysql_limits="YES" mysql_dbdir="/var/db/mysql" mysql_args="" 8. Start MySQL server: /usr/local/etc/rc.d/mysql-server.sh start 9. To check encoding of the datafields say: mysqladmin variables |grep character_set If everything is OK you will see many pieces of "utf8" string. ======================================================