Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Sunday, February 1, 2009

MySQL Replicate Tutorial

Some time we need to have the slave database server for backup, So we need to create replicate database.
The follow link is the good tutorial for MySQL

http://www.howtoforge.com/mysql_database_replication
or

Thursday, May 8, 2008

Font Thai in mysql like ??? on Ubuntu

My environment:
Ubuntu 7.04
mysql 5.0.38

If you see Thai font like ??????. because character set in mysql server and client was different.
You should set character set in server and client matched.
Check status in mysql.

In your computer No.2 may be latin. I had changed from latin to tis620.
First, You should edit file config in /etc/mysql/my.cnf and add default-character-set in

[client]
default-character-set = tis620

And....

[mysqld]
default-character-set = tis620
init_connect = 'SET NAMES tis620'

Save it and restart mysql with /etc/init.d/mysql restart
Thai font will be fixed

Tuesday, July 24, 2007

Thai language with MySQL

db.connection("jdbc:mysql://"+dbIp+"/"+dbName+"?user=root&password=1234&useUnicode=true&characterEncoding=UTF-8");
Because of in java code (Netbeans) use UTF-8 Encoding, so I need to connect with UTF-8 encoding.
After this point I always will write or read Thai language from DB.