使用時報錯如下
[root@localhost bin]# ./mysql -uroot -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 5.6.24 Source distributionCopyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.
Segmentation fault
mysql版本是5.6.24
伺服器是CentOS7.0
==========解決方案1============
在源碼包裡,編輯檔案 cmd-line-utils/libedit/terminal.c
把terminal_set方法中的 char buf[TC_BUFSIZE]; 這一行注釋,再把 area = buf;改為 area = NULL;
更改後如下
protected int terminal_set(EditLine *el, const char *term) { int i; /*char buf[TC_BUFSIZE];*/ char *area; const struct termcapstr *t; sigset_t oset, nset; int lins, cols; --phpfensi.com (void) sigemptyset(&nset); (void) sigaddset(&nset, SIGWINCH); (void) sigprocmask(SIG_BLOCK, &nset, &oset);area = NULL;
然後重新編譯即可