0

The current variables of MySQL 5.5 is

 show 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     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

If a client connect to this DB, without specifying charset using such as SET NAMES LATIN1, what charset it would use?

1 Answer 1

0

character_set_database this will be the default assuming you didn't mention character set while creating the original database.

Update from Comment conversation:
The connection charset for the client will use value of character_set_client. In this specific case utf8.

Ofcourse this affects only how the client handles strings.

2
  • I mean the connection charset of the client, not creating the database...
    – Howard
    May 14, 2011 at 5:31
  • it will then use the value of character_set_client. in this case 'utf8'. Note: this is for the client and has nothing to do with the db. May 14, 2011 at 5:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .