MySQL客户端分段错误
过去几天,我一直试图在Debian服务器上从源代码安装MySQL 5.1.59。每次我运行构建过程时,一切看起来都非常顺利(包括maketest)。在完成安装后的步骤后,我尝试运行客户端,并得到如下所示的分段错误。我知道我可以使用apt轻松地安装它,但我决心至少从源代码构建一次MySQL。任何想法或有用的提示都将不胜感激。提前谢谢MySQL客户端分段错误,mysql,segmentation-fault,runtime-error,Mysql,Segmentation Fault,Runtime Error,过去几天,我一直试图在Debian服务器上从源代码安装MySQL 5.1.59。每次我运行构建过程时,一切看起来都非常顺利(包括maketest)。在完成安装后的步骤后,我尝试运行客户端,并得到如下所示的分段错误。我知道我可以使用apt轻松地安装它,但我决心至少从源代码构建一次MySQL。任何想法或有用的提示都将不胜感激。提前谢谢 debiantesting-01:/usr/local/mysql# bin/mysql -u root -p Enter password: Welcome to
debiantesting-01:/usr/local/mysql# bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.59-log Source distribution
Copyright (c) 2000, 2011, 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
下面是我按顺序运行的命令的完整列表
groupadd mysql
useradd -g mysql mysql
tar -xvf mysql*
cd mysql*
ls
./configure --prefix=/usr/local/mysql --with-extra-charsets=all
make
make test
make install
cd /usr/local/mysql
ls
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
cp /usr/local/src/mysql*/support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/share/mysql/mysql.server start --user=mysql
/usr/local/mysql/bin/mysql_secure_installation
bin/mysql -u root -p
我尝试过在有--user标志和没有--user标志的情况下启动服务器,但结果没有改变。我还尝试了命令,它说“cd/usr/local/mysql;/usr/local/mysql/bin/mysqld_safe&”,它保持在前台并显示:
[1] 31150
debiantesting-01:/usr/local/mysql# 111115 09:37:30 mysqld_safe Logging to '/usr/local/mysql/var/debiantesting-01.err'.
111115 09:37:30 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
运行后,日志显示:
111115 10:30:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
111115 10:30:42 [Note] Event Scheduler: Loaded 0 events
111115 10:30:42 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.59-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
如果您需要更多信息,请随时询问,非常感谢您的宝贵时间
-Josh在接受Sjoerd的建议后,我使用gdb运行回溯跟踪,并能够找到与我的情况相匹配的错误报告。是链接。基本上,您必须修改term.c文件的第904行:注释掉它和第914行:将area设置为NULL
Example
904: //char buf[TC_BUFSIZE];
914: area = NULL;
一旦您做了这些更改,您应该能够重建MySQL
该文件应位于(MySQL源位置)/cmd行utils/libedit/term.c
否则,您可以使用find/-name“term.c”
来查找它
希望这有帮助
-Josh考虑在此基础上创建一个。一个程序决不能出错。当您提交错误报告时,还包括堆栈跟踪。安装gdb,然后运行gdb--args-bin/mysql-u root-p
。当gdb提示符出现时,键入bt
进行回溯。