mysql5.7源码编译安装报错记录一

一、解决CMake Error at cmake/boost.cmake:88 (MESSAGE):

解决办法是:

1.在/usr/local下创建一个名为boost的文件夹
mkdir -p /usr/local/boost

2.进入这个新创建的文件夹然后下载boost
wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz

3.解压
tar -xvzf boost_1_59_0.tar.gz

4.继续cmake,添加上红色部分

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/xoa/mysql \
-DMYSQL_DATADIR=/usr/local/xoa/mysql/data \
-DSYSCONFDIR=/etc \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_EMBEDDED_SERVER=1 \
-DENABLE_DTRACE=0 \
-DENABLED_LOCAL_INFILE=1 \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DWITH_BOOST=/usr/local/boost \
-DEXTRA_CHARSETS=all

 

二、报错如下:

Cannot find appropriate system libraries for WITH_SSL=system.
 
Make sure you have specified a supported SSL version.
 
Valid options are :
 
system (use the OS openssl library),
 
yes (synonym for system),
 
</path/to/custom/openssl/installation>**

 解决方法:

yum install -y openssl-devel

 

三、[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize

解决方法:

需要使用mysqld来初始化

./mysqld --initialize --datadir=/usr/local/mysql-cluster/data --user=mysql --basedir=/usr/local/mysql-cluster

在安装mysql时遇到以下错误

执行./mysqld --initialize 后

./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

原因是没有安装libaio.so.1,安装即可。

Ubuntu下执行:

apt-get install libaio1 libaio-dev

Redhat/Fedora/CentOS下执行:

yum install libaio

 

posted @ 2022-04-26 16:15  浪淘沙&  阅读(1181)  评论(0编辑  收藏  举报