【问题描述】
鲲鹏环境编译安装MySQL 8.0.24后执行/usr/local/mysql/bin/mysql -uroot -p -S /data/mysql/run/mysql.sock登录报“Segmentation fault (core dumped)”错误,详细报错如下:
# /usr/local/mysql/bin/mysql -uroot -p -S /data/mysql/run/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.24
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Segmentation fault (core dumped)

【解决方法】
1、修改mysql-8.0.24/extra/libedit/libedit-20191231-3.1/src/terminal.c源码
vim /home/mysql-8.0.24/extra/libedit/libedit-20191231-3.1/src/terminal.c
将terminal_set(EditLine *el, const char *term)函数中851行的 area = buf; 改为 area = NULL;

2、重新执行make && make install编译MySQL 8.0.24,再次登录MySQL即恢复正常;
【问题描述】
鲲鹏环境编译安装MySQL 8.0.24后执行/usr/local/mysql/bin/mysql -uroot -p -S /data/mysql/run/mysql.sock登录报“Segmentation fault (core dumped)”错误,详细报错如下:
# /usr/local/mysql/bin/mysql -uroot -p -S /data/mysql/run/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.24
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Segmentation fault (core dumped)
【解决方法】
1、修改mysql-8.0.24/extra/libedit/libedit-20191231-3.1/src/terminal.c源码
vim /home/mysql-8.0.24/extra/libedit/libedit-20191231-3.1/src/terminal.c
将terminal_set(EditLine *el, const char *term)函数中851行的 area = buf; 改为 area = NULL;
2、重新执行make && make install编译MySQL 8.0.24,再次登录MySQL即恢复正常;