Your answer: you can customize using MySql settings. There may be something out of context in My Answer, but it is also useful to you. How to customize Character Set and Collation .
For applications that store data using the default MySQL character set and collation ( latin1, latin1_swedish_ci ), no special configuration should be needed. If applications require data storage using a different character set or sorting, you can configure the character set of information in several ways:
- Specify character settings for each database. For example, hotels to use one database may require
utf8 , while applications that use another database may require sjis. - Specify character settings when starting the server. This causes the server to use the specified settings for all applications that do not take other measures.
- Specify character settings during setup if you are creating MySQL from a source. This forces the server to use these settings for all applications, without specifying them when the server starts.
The examples shown here for your question, to set the utf8 character set, here also set the mapping for the more useful ( utf8_general_ci collation`).
Specify character settings for each database
CREATE DATABASE new_db DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
Specify character parameters at server startup
[mysqld] character-set-server=utf8 collation-server=utf8_general_ci
Set character preferences at the time of MySQL configuration
shell> cmake . -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci
To see the character set values ββand system matching variables that apply to your connection, use the following instructions:
SHOW VARIABLES LIKE 'character_set%'; SHOW VARIABLES LIKE 'collation%';
This may be a long answer, but there is a way you can use. Hope my answer will be helpful to you. for more information http://dev.mysql.com/doc/refman/5.7/en/charset-applications.html
Vipin Jain Jan 20 '16 at 6:04 2016-01-20 06:04
source share