The Answer to Life, the Universe, and Everything

Friday, January 11, 2008

MySQL5 character set

All you need to edit my.cnf in order not to write the command like "set name xxx" everytime you restart the service.


[client]
default-character-set = utf8

[mysqld]
skip-character-set-client-handshake
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8

[mysqldump]
default-character-set = utf8

[mysql]
default-character-set = utf8


In order to check the charset

mysql> shwo variables like 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

#Then set charset
mysql>set character_set_database=utf8
mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+


51 comments:

Anonymous said...

You save my LIFEEEEE !!!!

Anonymous said...

You, sir, are a legend.

Anonymous said...

You save my LIFEEEEE !!!!

and

You, sir, are a legend.

Anonymous said...

[url=http://www.blingforfun.com]hip hop jewelry[/url],[url=http://www.blingforfun.com/pendants/cat_9.html]hip hop pendants[/url],hip hop watches,[url=http://blingforfun.com/belts/cat_18.html]bling bling[/url] ,hip hop,[url=http://blingforfun.com/chains/cat_7.html]hip hop chains[/url],hip hop bling,[url=http://blingforfun.com/chains/cat_7.html]iced out chains[/url],[url=http://www.blingforfun.com/chains/cat_7.html]wholesale chains[/url]
hip hop jewelry
wholesale hip hop watches
hip hop rings

Anonymous said...

i honestly enjoy all your writing choice, very charming,
don't give up as well as keep creating since it just well worth to look through it,
excited to browse through more of your own content articles, enjoy your day!

Anonymous said...

dog friendly hotels business hotels, la quinta hotel, hotel rooms cheap hotel accomodation cheap florida hotels, inexpensive hotels, cheap chicago hotels maritime hotel pensione hotel, the george hotel, housing for sale buy viagra buy viagra online no prescription, buy viagra online legally, buy viagra no prescription cheap uk hotels fraser island accommodation, cheap miami beach hotels, cheap stocks

Anonymous said...

italy breakfast booking
[url=http://vimeo.com/user4498961]hotel price compare
[/url]plane presence
second-rate ill fame in the direction of convey title
satisfaction
[url=http://www.earthday.org/users/48490]cheap rates for hotels
[/url]matrix min hotel deals
european breakfast booking
hotels motels
[url=http://www.fairview.org/cty/members/klemot/default.aspx]meridional hotel
[/url]jal frugality class
thai airways restraint classification
aqui es motor hotel
[url=http://www.youthcabinet.org/profile/Josh]hotel price bot
[/url]oldest merit feeling excursions
what is premium thrift kind
guest-house deals april
[url=http://www.beautyresearch.com/blogs/alexa/archive/2010/08/15/hotels-and-accomodations.aspx]near hotel
[/url]online hotel reservation
economical breakfast
tuppence bangkok hotels
[url=http://www.mazdacommunity.com/profiles/blogs/special-hotel-offers-or]pod hotel
[/url]fair b & b deals
economy legislature slippers
the weekend michael gray download

Anonymous said...

payday loans online http://www.2applyforcash.com/ Eraxy Payday Loans unenteecheveash [url=http://www.2applyforcash.com/]Payday Loans[/url] payday loans online If you are brand-new in the game of internet marketing and desire to information to online browsers through these forums.

Anonymous said...

sildenafil without prescription viagra online natural - can you buy viagra online australia

Anonymous said...

http://westcoasttrading.com/content/empower-network-streetlight-ietting-filipinos Eraxy [url=http://www.boattripsonline.com/content/nova-empower-network-educate]making money online[/url] unenteecheveash business to start under 1000

Anonymous said...

buy viagra online viagra online without prescription- free shipping - buy viagra at cvs

Anonymous said...

viagra cost buy cheap viagra online - buy viagra online overnight shipping

Anonymous said...

viagra 50mg viagra online reviews - viagra online order

Anonymous said...

soma pain soma drug - soma shop jaipur

Anonymous said...

buy soma buy soma online fedex - beach house soma san diego

Anonymous said...

buy soma soma online ship texas - soma drug withdrawal

Anonymous said...

buy soma online soma intimates outlet - where to order somatropin

Anonymous said...

buy soma soma online paypal - soma drug opiate

Anonymous said...

buy soma medication called soma - buy soma online $0.45 each

Anonymous said...

buy soma generic cheap soma - soma 350 mg high

Anonymous said...

order soma online soma bras ebay - soma rx online

Anonymous said...

buy soma many 350 mg soma should take - buy soma online no prescription cheap

Anonymous said...

buy cialis cialis daily use benefits - best place order cialis

Anonymous said...

cialis online cialis price 20mg - generic cialis prescription

Anonymous said...

buy tramadol in florida tramadol for dogs pet meds - tramadol 99 free shipping

Anonymous said...

buy tramadol next day tramadol questions - tramadol hcl 319

Anonymous said...

buy tramadol overnight shipping tramadol hcl usp - buy tramadol cheapest

Anonymous said...

xanax online where to order xanax online no prescription - xanax lorazepam

Anonymous said...

buy xanax online forum 6633n sap drug test xanax - xanax bars highest mg

Anonymous said...

generic xanax xanax overdose while pregnant - xanax bars

Anonymous said...

xanax cost fake xanax pills - generic xanax vs brand name xanax

Anonymous said...

buy carisoprodol carisoprodol uses - carisoprodol expiration date

Anonymous said...

generic xanax xanax side effects webmd - xanax online overnight shipping

Anonymous said...

carisoprodol buy carisoprodol bluelight - carisoprodol tablets usp 350 mg

Anonymous said...

generic xanax xanax online australia - xanax dosage 1mg

Anonymous said...

buy carisoprodol soma carisoprodol classification - medicine soma carisoprodol

Anonymous said...

order tramadol online tramadol for cheap - buy tramadol at walmart

Anonymous said...

best buy tramadol tramadol 50 mg side effects for dogs - tramadol no prescription overnight delivery

Anonymous said...

buy cialis cheap cialis online united states - cialis daily experiences

Anonymous said...

xanax medication xanax for sale no prescription - where can i buy xanax no prescription

Anonymous said...

xanax online xanax drug food interactions - maximum xanax dosage per day

Anonymous said...

buy cialis online cialis coupon cvs - buy cialis online usa paypal

Anonymous said...

buy cialis online buying cialis online usa - cialis daily or 36

Anonymous said...

http://landvoicelearning.com/#63987 tramadol hcl 50mg dosage - tramadol for dogs human use

Anonymous said...

buy tramadol online tramadol 50mg tablets for dogs - tramadol seizures

Anonymous said...

buy lorazepam online ativan side effects weight loss - ativan addiction elderly

Anonymous said...

buy tramadol no prescription tramadol overdose help - safe order tramadol online

Anonymous said...

carisoprodol 350 mg carisoprodol overdose mg - carisoprodol soma watson 350 mg

Anonymous said...

carisoprodol 350 mg carisoprodol uses - carisoprodol how long does it last

Anonymous said...

buy carisoprodol c o d carisoprodol 350 mg forum - carisoprodol 350 mg overnight

Anonymous said...

carisoprodol 350 mg carisoprodol found drug test - carisoprodol while breastfeeding