mysql数据库错误.1231,MySQL错误1231(42000):变量'character_set_client'不能设置为'NULL'的值...

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!

解决方案

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 @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;

/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;

/*!40101 SET NAMES utf8 */;

/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;

/*!40103 SET TIME_ZONE='+00:00' */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;

/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
m.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required错误是由于在使用spring boot整合jpa连接mysql时引入的mysql数据库版本过高导致的。该错误提示需要使用CLIENT_PLUGIN_AUTH认证插件才能连接到数据库。 解决这个问题的方法是将mysql数据库版本降低到一个较低的版本。可以通过修改pom.xml文件中的mysql-connector-java依赖的版本号来实现。将版本号改为一个低版本,例如5.1.4,然后重新运行项目。 另外,在pom.xml文件中还可以配置低版本的mysql驱动的jar包,如将mysql.version设置为5.1.6,然后重新编译和运行项目。这样就可以解决m.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required错误了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [com.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required 这个问题怎么解决](https://blog.csdn.net/sxeric/article/details/116187961)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [启动报错 Caused by: com.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required](https://blog.csdn.net/m0_37622302/article/details/122160849)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值