Hive报错记录

Hive报错记录


报错1:

[hyj@hadoop102 hive-3.1.2]$ sudo mysqld --initialize --user=mysql

我在此步出现了以下错误:

2022-05-22T08:44:45.327711Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.  Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 
2022-05-22T08:44:45.327928Z 0 [ERROR] Error message file '/usr/share/mysql/english/errmsg. sys' had only 1080 error messages, 
but it should contain at least 1120 error messages. 
Check that the above file is the right version for                     this program! 
2022-05-22T08:44:45.329400Z 0 [ERROR] --initialize specified but the data directory has files in it.  Aborting. 
2022-05-22T08:44:45.329418Z 0 [ERROR] Aborting

第一种错误(2022-05-22T08:44:45.327711Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details) 的解决方法:
在/etc/my.cnf文件中加上explicit_defaults_for_timestamp=true保存后就可以了.

第二种错误(2022-05-22T08:44:45.327928Z 0 [ERROR] Error message file ‘/usr/share/mysql/english/errmsg. sys’ had only 1080 error messages,
but it should contain at least 1120 error messages.
Check that the above file is the right version for this program!
)的解决方法为:

  1. 先去官网下载mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz(下载对应版本的)
    官网下载地址:https://downloads.mysql.com/archives/community/
  2. 将mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz上传到/opt/software目录下
  3. 将mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz解压到当前目录下
  4. 将mysql安装目录下的share/english/errmsg.sys 文件覆盖 /usr/share/mysql/english/errmsg.sys文件即可
[hyj@hadoop102 software]$ tar -zxvf mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz 
[hyj@hadoop102 software]$ cd mysql-5.7.29-linux-glibc2.12-x86_64/
[hyj@hadoop102 mysql-5.7.29-linux-glibc2.12-x86_64]$ cd share/english/
[hyj@hadoop102 english]$ ls
errmsg.sys
[hyj@hadoop102 english]$ sudo mv /usr/share/mysql/english/errmsg.sys /usr/share/mysql/english/errmsg.bak
[hyj@hadoop102 english]$ sudo cp errmsg.sys /usr/share/mysql/english/
[hyj@hadoop102 english]$ cd /opt/software
[hyj@hadoop102 software]$ rm -fr mysql-5.7.29-linux-glibc2.12-x86_64 mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz

最后再重新初始化数据库就可以了.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值