mysql通过SOURCE导入SQL时报错处理

mysql通过SOURCE导入SQL时报错处理

mysql通过SOURCE导入SQL时报错处理

ERROR:

unknown command '\n'

Can't connect to the server

网上查询了,多少是编码问题引起,一边是UTF8一边是GBK,反复调整MY.CNF配置文件可搞定。


# The following options will be passed to all MySQL clients
[client]
#password = your_password
port  = 3306
socket  = /tmp/mysql.sock
default-character-set=utf8 


# Here follows entries for some specific programs

# The MySQL server
[wampmysqld]
port  = 3306
socket  = /tmp/mysql.sock
character-set-server=gbk 

key_buffer = 16M