数据库
MySQL
ORACLE
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
Linux运维
中间件
shell脚本
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
占位哈哈
首页 动态 发帖 版块 我的
 退出
游客  
等级:
金豆:
经验:
首页  /  数据库  /  MySQL  /  正文

mysql8登陆数据库报错Segmentation fault (核心已转储)的解决办法

  1821 
 0
 1
今天在登陆新安装好的数据库报如下错误:

[root@lnmp ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.21

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Segmentation fault (核心已转储)
原因好像是和C语言有关系

解决办法:

修改terminal.c文件重新编译安装

[root@lnmp mysql-8.0.21]# find ./ -name terminal.c
./extra/libedit/libedit-20190324-3.1/src/terminal.c

查找出来之后按照以下方式修改

[root@lnmp mysql-8.0.21]# vim /opt/mysql-8.0.21/extra/libedit/libedit-20190324-3.1/src/terminal.c
 842 terminal_set(EditLine *el, const char *term)
 843 {
 844         int i;
 845         /*char buf[TC_BUFSIZE];*/
 846         char *area;
 847         const struct termcapstr *t;
 848         sigset_t oset, nset;
 849         int lins, cols;
 850 
 851         (void) sigemptyset(&nset);
 852         (void) sigaddset(&nset, SIGWINCH);
 853         (void) sigprocmask(SIG_BLOCK, &nset, &oset);
 854 
 855         area = NULL;
Image


修改完之后在重新编译安装就可以了!

还得重来一遍,想想都费劲啊!

标签:
作者签名:    楼主  2020-09-19 11:06:23

点赞推荐

回复列表
合作伙伴:
Powered by 运维术 8.3.2
© 2017-2024 模板 by 黑衣人
您的IP: 3.135.211.85 , 2024-09-19 09:03:10
Powered by 运维术 8.3.2
© 2017-2024 模板 by 黑衣人
(1) 分享
分享
取消
我的客服