Advertisement

08.06.2008 at 02:34AM PDT, ID: 23625033
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

How to set characterset to UTF8

Asked by ostraaten in MySQL Server, SuSE Linux

Tags: , , ,

Hi
I'm trying to tell my mysql database to use UTF8 as character set, this seems trivial but I can't get it to work. My special characters are maimed in the database. I played around with the configuration file my.cnf, it does have effect on some system variables but didn't result in a working solution.

As the trial and error approach is not working for me, I would like to have some conclusive information on how to do this with MySQL.

Did change some the variables but characters are still maimed.
[mysqld]
character-set-server            = utf8
default-character-set           = utf8

MySQL failed to start on the following
[mysqld]
character-set-server            = utf8
default-character-set           = utf8
character-set-client            = utf8
character-set-connection        = utf8

Failed to start
[mysqld]
character-set-server            = utf8
default-character-set           = utf8
collation_connection            = utf8

MySQL starts but no effect
[mysqld]
init-connect='SET NAMES utf8'

MySQL start but no effect
init-connect='CHARSET utf8'



mysql> show variables like 'colla%';
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database   | latin1_swedish_ci |
| collation_server     | latin1_swedish_ci |
+----------------------+-------------------+
3 rows in set (0.00 sec)

mysql> show variables like 'charact%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
Start Free Trial
[+][-]08.06.2008 at 02:56AM PDT, ID: 22168502

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL Server, SuSE Linux
Tags: MySQL, MySQL, mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i686) using readline 5.0, on SuSE Linux
Sign Up Now!
Solution Provided By: psadac
Participating Experts: 2
Solution Grade: B
 
 
[+][-]08.06.2008 at 03:15AM PDT, ID: 22168580

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628