<分区>
过去几天,我一直在尝试在 Debian 服务器上从源代码安装 MySQL 5.1.59。每次我运行构建过程时,一切似乎都非常顺利(包括 make test)。完成安装后步骤后,我尝试运行客户端并出现段错误,如下所示。我知道我可以使用 apt 轻松安装它,但我决心至少从源代码构建 MySQL 一次。任何想法或有用的提示将不胜感激。提前致谢!
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 标志启动服务器,但它不会改变结果。我也试过它说的命令“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
如果您需要更多信息,请随时询问,非常感谢您抽出宝贵时间!
-乔希