RHEL5.7 64-bit source code compilation and installation of MySQL-5.5.42 Problems

Source: Internet
Author: User

RHEL5.7 64-bit source code compilation and installation of MySQL-5.5.42 Problems

Since MySQL is compiled and installed from source code Versions later than MySQL 5.5 using cmake, make, and make install, no. /Configure, make, make install, so check whether the system has the cmake command. Red Hat Enterprise 5 is not installed by default, so you need to install it manually (Red Hat 6 has been installed by default ). The cmake installation method can be searched online.

The installation method officially provided by Mysql is as follows:

# Preconfiguration setup
Shell> groupadd mysql
Shell> useradd-r-g mysql
# Beginning of source-build specific instructions
Shell> tar zxvf mysql-VERSION.tar.gz
Shell> cd mysql-VERSION
Shell> cmake.
Shell> make
Shell> make install
# End of source-build specific instructions
# Postinstallation setup
Shell> cd/usr/local/mysql
Shell> chown-R mysql.
Shell> chgrp-R mysql.
Shell> scripts/mysql_install_db -- user = mysql
Shell> chown-R root.
Shell> chown-R mysql data
# Next command is optional
Shells> cp support-files/my-medium.cnf/etc/my. cnf
Shell> bin/mysqld_safe -- user = mysql &
# Next command is optional
Shell> cp support-files/mysql. server/etc/init. d/mysql. server

Parameters are added after self-Compilation:
Cmake. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-DMYSQL_DATADIR =/data/mydata-DSYSCONFDIR =/etc-region = 1-region = 1-region = 1-DWITH_READLINE = 1-DWITH_SSL = system-DWITH_ZLIB = system-DWITH_LIBWRAP = 0-DMYSQL_UNIX_ADDR =/tmp/mysql. sock-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci


Compilation failed when executing make:
[69%] Building C object vio/CMakeFiles/vio. dir/vissl. c. o
/Root/mysql-5.5.42/vio/vissl. c: In function assl_doa:
/Root/mysql-5.5.42/vio/Violet. c: 175: error: aSSL_OP_NO_COMPRESSIONa undeclared (first use in this function)
/Root/mysql-5.5.42/vio/vissl. c: 175: error: (Each undeclared identifier is reported only once
/Root/mysql-5.5.42/vio/vissl. c: 175: error: for each function it appears in .)
Make [2]: *** [vio/CMakeFiles/vio. dir/vissl. c. o] Error 1
Make [1]: *** [vio/CMakeFiles/vio. dir/all] Error 2
Make: *** [all] Error 2
This is because the openssl version is too low and mysql5.5 cannot be compiled in openssl-1.0.0 or earlier versions. The openssl version is openssl-0.9.8, openssl version-.
If you do not need ssl, you can remove the WITH_SSL configuration item, or upgrade the openssl version. In addition, you can install a patch before cmake.
Upgrade openssl:
Download from ftp://ftp.openssl.org/source/
Tar-xvf openssl-1.0.2a.tar.gz
Cd openssl-1.0.2a
./Config shared zlib
Make
Make install

Mv/usr/bin/openssl/tmp/
Ln-s/usr/local/ssl/bin/openssl/usr/bin/openssl
Ln-s/usr/local/ssl/include/openssl // usr/include/openssl
Echo "/usr/local/ssl/lib">/etc/ld. so. conf
Ldconfig-v | grep openssl
View version:

Openssl version-
Re-compile:
Run the following command first:
Make clean

Rm CMakeCache.txt
After that, I try again and find that it is still unsuccessful (why is the upgrade still unsuccessful ?). Finally, the-DWITH_SSL = system is removed and compiled successfully.
Remove the DWITH_SSL = system parameter as follows:
Cmake. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-DMYSQL_DATADIR =/data/mydata-DSYSCONFDIR =/etc-region = 1-region = 1-region = 1-DWITH_READLINE = 1-DWITH_ZLIB = system-DWITH_LIBWRAP = 0-DMYSQL_UNIX_ADDR =/tmp/mysql. sock-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci

-------------------------------------- Split line --------------------------------------

Install MySQL in Ubuntu 14.04

MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Build a MySQL Master/Slave server in Ubuntu 14.04

Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

MySQL-5.5.38 universal binary Installation

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

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.