分類  >  資料庫 >

My SQL 5.6.X 設立修改資料庫編碼

tags:    時間:2013-12-23 21:49:20
My SQL 5.6.X 設置修改資料庫編碼

默認的my-sample.ini改為 my.ini

如果是綠色版的,可以直接修改該文件實現修改編碼等。。。。

以下是我的設置 僅供參考(編碼為UTF-8)

 

 

    my.ini:

# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [client] default-character-set=utf8  [mysqld]  # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M  # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin  # These are commonly set, remove the # and set as required. port=3306 basedir=D:\dev_tools\mysql_5.6 datadir=D:\dev_tools\mysql_5.6\data default-storage-engine=INNODB character_set_server=utf8 collation-server=utf8_general_ci # server_id = .....   # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M   sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  

 

    查看mysql的編碼:

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       | D:\dev_tools\mysql_5.6\share\charsets\ | +--------------------------+----------------------------------------+ 8 rows in set (0.00 sec)  mysql>

 

推薦閱讀文章

Bookmark the permalink ,來源:互聯網