Home > Database > Mysql Tutorial > hadoop 集群环境Sqoop 将数据导入mysql问题 many connection err

hadoop 集群环境Sqoop 将数据导入mysql问题 many connection err

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:34:12
Original
1036 people have browsed it

hadoop 集群环境下面, 使用 sqoop 将hive 统计完生成的数据 导入 到 mysql 数据库中, 碰到 异常 Caused by: java.sql.SQLException: null, message from server: Host 'datanode' is blocked because of many connection errors; unblock with 'mysqladmin

hadoop 集群环境下面, 使用 sqoop 将hive 统计完生成的数据 导入 到 mysql 数据库中, 碰到 异常 


Caused by: java.sql.SQLException: null,  message from server: "Host 'datanode' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

这是 同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞;

解决 方法  使用管理员身份进入到mysql       输入以下命令:       set global max_connect_errors = 1000;


java.io.IOException: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'traffic' at row 1

该问题是数据库中 traffic 列 字段长度不够造成的, 修改该字段的长度即可解决问题。



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template