Re: Character set differs in reality
Posted by: Rick James
Date: October 20, 2010 08:27PM

mysql> show GLOBAL variables like 'character%';
+--------------------------+-----------------------------------------------+
| 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       | ... |
+--------------------------+-----------------------------------------------+

mysql> show SESSION variables like 'character%';
+--------------------------+-----------------------------------------------+
| Variable_name            | Value                                         |
+--------------------------+-----------------------------------------------+
| character_set_client     | latin1                                        |
| character_set_connection | latin1                                        |
| character_set_database   | utf8                                          |
| character_set_filesystem | binary                                        |
| character_set_results    | latin1                                        |
| character_set_server     | utf8                                          |
| character_set_system     | utf8                                          |
| character_sets_dir       | ... |
+--------------------------+-----------------------------------------------+

Another way you could be seeing different values: You may have
init_connect = 'SET NAMES utf8'
in your my.cnf (my.ini). if so, be advised that 'root', and any other user from <tt>GRANT ALL ON *.*</tt>, has "SUPER" privilege, will skip the <tt>init_connect</tt>.

Options: ReplyQuote


Subject
Views
Written By
Posted
3293
October 19, 2010 02:38PM
Re: Character set differs in reality
1333
October 20, 2010 08:27PM


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.