Re: utf8 character show as ???
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.socket
> default-chararcter-set=utf8
> default-collation=utf8_general_ci
This is the setting for mysql server. And it only affect server character set variables which are:
character_set_server
character_set_database
character_set_client, character_set_connection, character_set_results are client character set variables. So if you wan to set the default values for these variables, you need to set the option in 'mysql' section of my.cnf(or my.ini) file.
[mysql]
default-chararcter-set=utf8
However, this works only for 'mysql' client program, not for the application program. You may need to set the client character set for your programs. How to do this depends on the programming language.
One way to do this is the set an start up option in mysqld section of my.cnf file.
[mysqld]
init_connect='SET NAMES utf8'
By setting this, the statement will be executed by the server right after each client cnnect to the server.
Subject
Views
Written By
Posted
9603
February 13, 2005 10:00PM
6463
February 14, 2005 09:19PM
4616
March 03, 2005 06:58PM
4069
December 30, 2005 01:39AM
3761
February 28, 2006 03:41AM
7330
October 16, 2005 09:33PM
3368
October 16, 2005 10:25PM
3547
May 07, 2005 08:43AM
3083
May 20, 2005 04:56PM
3284
May 20, 2005 09:08PM
3115
May 09, 2005 03:17PM
3309
May 10, 2005 10:19AM
Re: utf8 character show as ???
2985
May 20, 2005 09:01PM
3804
May 25, 2005 07:50AM
3189
May 20, 2005 08:38PM
2801
June 10, 2005 11:17AM
4018
June 22, 2005 04:48PM
2802
June 28, 2005 01:48AM
2702
July 06, 2005 02:02AM
2875
December 15, 2005 05:13AM
2930
July 11, 2005 05:21PM
2659
July 11, 2005 05:55PM
2811
July 11, 2005 07:50PM
2656
October 31, 2005 12:22AM
2788
November 03, 2005 05:12AM
2422
July 27, 2005 02:56PM
2769
August 04, 2005 08:57AM
2389
December 08, 2005 03:14AM
2861
April 05, 2006 10:09AM
2920
April 07, 2006 03:47PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.