鲲鹏云源码安装mysql5.7.31

基本上按照文档
https://www.huaweicloud.com/kunpeng/software/mysql0.html

文档中的cmake脚本启动报错,把换行全去掉了

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/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 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci -DWITH_EMBEDDED_SERVER=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/mysql/mysql-5.7.31/boost/boost_1_73_0

make时遇到报错Package ‘libtirpc’, required by ‘virtual:world’, not found
直接yum安装解决

yum install -y libtirpc-devel

make时遇到报错CMake Error at rapid/plugin/group_replication/rpcgen.cmake:100 (MESSAGE):
Could not find rpcgen

下载依赖编译安装

wget https://github.com/thkukuk/rpcsvc-proto/releases/download/v1.4/rpcsvc-proto-1.4.tar.gz
tar xf rpcsvc-proto-1.4.tar.gz
cd rpcsvc-proto-1.4
./configure
make
make install

/etc目录下没有my.cnf,直接自己创建

[mysqld]
datadir=/data/data
socket=/data/data/mysql.sock

symbolic-links=0

[mysqld_safe]
log-error=/data/log/mysql.log
pid-file=/data/run/mysql.pid

你可能感兴趣的:(linux)