博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Mysql编码问题

Posted on 2013-05-30 19:13  TimeFight  阅读(119)  评论(0)    收藏  举报

找到my.in

[client]

port=3306

default-character-set=utf8

[mysql]

 

# SERVER SECTION

# ----------------------------------------------------------------------

# # The following options will be read by the MySQL Server. Make sure that

# you have installed the server correctly (see above) so it reads this # file.

# [mysqld]

# The TCP/IP Port the MySQL Server will listen on port=3306

 

#Path to installation directory. All paths are usually resolved relative to this. basedir="G:/Mysql Install Folder/"

#Path to the database root datadir="G:/Mysql Install Folder/Data/"

# The default character set that will be used when a new schema or table is # created and no character set is defined

character-set-server=utf8

# The default storage engine that will be used when create new tables when default-storage-engine=INNODB

# Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

将红色背景的编码改成UTF8在   控制面板 》管理工具 》服务  重启mysql即可

如果重启不了 重启电脑也可