mysql error 1231_MySQL ERROR 1231 (42000):Variable ‘character_set_client’ can’t be set to the value …

  • Post author:
  • Post category:mysql


可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):

问题:

I’ve a MySQL 5.0.84 running in a Slackware 13.0 Staging server and wanted to copy a single table to another server which was built to use Ubuntu 14.04 OS for some other testing. I’ve taken a mysqldump of that table and copied to the testing server. I get the following error when I try to restore the dump file.

ERROR 1231 (42000):Variable ‘character_set_client’ can’t be set to the value of ‘NULL’

Please help me how to fix this error. Thanks!

回答1:

I did some search in internet and fixed it finally.

Added the following text at the beginning of the mysqldump file and the restore was successful. /*!40101 SET @[email protected]@CHARACTER_SET_CLIENT */; /*!40101 SET @[email protected]@CHARACTER_SET_RESULTS */; /*!40101 SET @[email protected]@COLLATION_CONNECTION */; /*!40101 SET NAMES u



版权声明:本文为weixin_34474896原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。