Re: Problem setting the "default-character-set" parameter in my.ini file.
Thanks Rick James.
I logged in using another user id + DB as mentioned below:
mysql -u test_user -ptestpwd test_db
The my.ini file has the same value for "default-character-set" as mentioned below:
[mysql]
default-character-set=latin1
Now when I execute the following command, I still get the same utf8 character set data (as mentioned in my very first post)
mysql> show 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 | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.05 sec)
Now, I log out & reconnect using the following command:
mysql -u test_user -ptestpwd test_db --default_character_set latin1
& execute the following command & get the expected output:
mysql> show 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 | C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.00 sec)
Regards,
Sachin Vyas.
Subject
Views
Written By
Posted
8128
July 31, 2012 01:38AM
2799
July 31, 2012 08:51PM
Re: Problem setting the "default-character-set" parameter in my.ini file.
2768
July 31, 2012 11:00PM
2209
August 01, 2012 09:00PM
2259
August 02, 2012 12:26AM
2145
August 02, 2012 09:23PM
2091
August 02, 2012 10:32PM
2623
August 03, 2012 04:46AM
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.