Chinese insert an error under mysql dos

When the windows dos client connections mysql The following error appears
ERROR 1067 (42000): Invalid default value for 'add'
then the current character encoding dos not tell mysql database, because the Chinese dos coding only gbk, this time to see the dos connection arrives overall encoding database (show variables like 'char%' ;) easy to see the current client character encoding and connecting the encoder are set to utf8,
and dos command Chinese only supports gbk, when dos transmitted encoded gbk Chinese characters to when mysql, mysql utf8 encoding to resolve, of course there will be an exception
solution: enter the names GBK the
SET; ----------------
Disclaimer: This article is CSDN blogger "Hao-Jiang" in original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq973740090/article/details/78484969

Published 14 original articles · won praise 0 · Views 217

Guess you like

Origin blog.csdn.net/qq_36283674/article/details/102932983