在 /etc/my.cnf 里面的client 段加上 init_connect=”set names ‘gbk’” 更具体的可以参考 http://ria.richtechmedia.com/?p=313 这个链接,说得蛮清楚的。