时间:2021-07-01 10:21:17 帮助过:24人阅读
- <code>#### 1) 下载[mysql源码](https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.16.tar.gz)
- #### 2) 下载安装[cmake3.15.4](https://github-production-release-asset-2e65be.s3.amazonaws.com/537699/df454700-e504-11e9-9f92-983f424a74fe?X- Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191010%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191010T104620Z&X-Amz-Expires=300&X-Amz-Signature=cead04c14068deb5)
- #### 3) 下载[wolfssl-3.14.0.zip](http://www.mirrorservice.org/sites/distfiles.macports.org/wolfssl/wolfssl-3.14.0.zip</code>
)
#### 4) 下载wolfssl-path
- <code>```
- cd extra/wolfssl-3.14.0
- patch -p1 < wolfssl-3.14.0-mysql.diff
- cd extra/wolfssl-3.14.0/IDE/MYSQL
- ./do.sh
- ```</code>
- <code>```
- mkdir build && cd build
- ```</code>
- <code>```
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON -DWITH_INNODB_MEMCACHED=ON -DWITH_SSL=wolfssl -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/Users/sherlock/documents/mysql-8.0.16/boost/boost_1_69_0
- ```</code>
- <code>```
- mysqld --initialize-insecure
- ```</code>
注:如果有提示启动失败,那么你可以去my.cnf中配置的log_error文件看看原因,一般启动失败都是权限原因;另外要确保my.cnf配置生效,你可以使用命令mysql --help | grep my.cnf,会显示配置文件优先级的路径,确保只有/usr/local/mysql/etc的配置生效,其他你可以先删除。
mysql 8.0.16 源码编译[Mac os x平台]
标签:ext dde memcached 补丁 mysq hmac archive path use