centos mysql 编译安装_centos 编译安装mysql 报错如下,该如何解决呢

[root@bogon mysql-5.7.17]# make

[  0%] Built target INFO_BIN

[  0%] Built target INFO_SRC

[  0%] Built target abi_check

[  0%] Built target zlib

[  1%] Built target yassl

[  2%] Built target taocrypt

[  4%] Built target edit

[  7%] Built target strings

[ 11%] Built target mysys

[ 11%] Built target dbug

[ 12%] Built target mysys_ssl

[ 12%] Built target comp_err

[ 12%] Built target GenError

[ 12%] Built target archive

[ 12%] Built target archive_embedded

[ 12%] Built target csv

[ 12%] Built target csv_embedded

[ 13%] Built target heap

[ 14%] Built target heap_embedded

[ 14%] Built target hp_test1

[ 14%] Built target hp_test2

[ 20%] Built target perfschema

[ 20%] Built target mytap

[ 21%] Built target pfs_server_stubs

[ 21%] Built target pfs-t

[ 21%] Built target pfs_account-oom-t

[ 21%] Built target comp_sql

[ 22%] Built target GenSysSchema

[ 22%] Built target partition

[ 23%] Built target myisammrg

[ 23%] Built target federated

[ 23%] Built target blackhole

[ 23%] Built target lz4_lib

[ 30%] Built target innobase

[ 33%] Built target myisam

[ 33%] Built target ngram_parser

[ 33%] Built target vio

[ 33%] Built target regex

[ 33%] Built target binlogevents_static

[ 33%] Built target gen_lex_hash

[ 33%] Built target GenServerSource

[ 33%] Built target gen_lex_token

[ 33%] Built target GenDigestServerSource

[ 33%] Built target GenBootstrapPriv

[ 44%] Built target sql

[ 44%] Built target rpl

[ 44%] Built target master

[ 45%] Built target binlog

[ 46%] Built target slave

Linking CXX executable pfs_connect_attr-t

collect2: ld 返回 1

make[2]: *** [storage/perfschema/unittest/pfs_connect_attr-t] 错误 1

make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] 错误 2

make: *** [all] 错误 2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
编译安装MySQL 8在CentOS 7上需要以下步骤: 1. 安装必要的依赖: ``` sudo yum install -y gcc-c++ cmake make bison ncurses-devel ``` 2. 下载MySQL源代码: ``` wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.26.tar.gz ``` 3. 解压源代码包: ``` tar -zxvf mysql-8.0.26.tar.gz ``` 4. 进入解压后的目录: ``` cd mysql-8.0.26 ``` 5. 创建一个用于安装MySQL的目录: ``` sudo mkdir /usr/local/mysql ``` 6. 配置编译选项: ``` sudo cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock -DMYSQL_TCP_PORT=3306 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_general_ci ``` 7. 编译安装MySQL: ``` sudo make && sudo make install ``` 8. 初始化MySQL数据目录: ``` sudo /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data ``` 9. 设置MySQL服务: ``` sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql sudo chmod +x /etc/init.d/mysql sudo chkconfig --add mysql ``` 10. 启动MySQL服务: ``` sudo service mysql start ``` 11. 运行安全脚本以提高MySQL的安全性: ``` sudo /usr/local/mysql/bin/mysql_secure_installation ``` 12. 完成安装后,您可以使用以下命令登录到MySQL: ``` /usr/local/mysql/bin/mysql -u root -p ``` 这样就完成了在CentOS 7上编译安装MySQL 8的过程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值