Install MySQL 5.6.16 logon error: Segment Error (segmentation fault) solution

Source: Internet
Author: User

Centos 6.5 After installing MySQL 5.6.16, error using command logon:

[Root@test mysql-5.6.16]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; Or\g.
Your MySQL Connection ID is 1
Server Version:5.6.16-log Source Distribution

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

Oracle is a registered trademark the Oracle Corporation and/or its
Affiliates. Names may trademarks of their respective
Owners.

Segment Error

Chinese system will appear "paragraph error", the English version is "segmentation fault", looked for many methods can not be successful, finally in the foreign site to see the solution to the bug: https://bugs.launchpad.net/ Percona-server/+bug/1201123, as described above, the problem-solving steps are as follows:

1. In the MySQL 5.6.16 source code package, edit the file cmd-line-utils/libedit/terminal.c
2. Locate the code snippet similar to char buf[tc_bufsize]; , annotate it and find the following variable area = BUF; , change it to area = NULL;

The corrected code is similar:

865 protected int
866 Terminal_set (editline *el, const char *term)
867 {
868 int i;
869/*char buf[tc_bufsize];*/
870 Char *area;
871 const struct TERMCAPSTR *t;
872 sigset_t Oset, Nset;
873 int Lins, cols;
874
875 (void) sigemptyset (&nset);
876 (void) Sigaddset (&nset, sigwinch);
877 (void) sigprocmask (Sig_block, &nset, &oset);
878
879 area = NULL;

After saving, recompile MySQL, you can log on at the command line normally

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.