1.安装依赖
udo apt-get install gcc g++ -y
sudo apt-get install libssl-dev
sudo apt-get install libncurses5 libncurses5-dev -y
2.make
cmake -DCMAKE_INSTALL_PREFIX=/pingchas/code/mysql_data/5.7.32 -DMYSQL_DATADIR=/pingchas/code/mysql_data/5.7.32/data -DSYSCONFDIR=/pingchas/code/mysql_data/5.7.32 -DMYSQL_UNIX_ADDR=/pingchas/code/mysql_data/5.7.32/data/mysql.sock -DWITH_DEBUG=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/pingchas/code/boost_1_59_0
3.编译安装
make -j 4
make install -j 4
4.初始化Mysql
mysqld --basedir=/pingchas/code/mysql_data/5.7.32 --datadir=/pingchas/code/mysql_data/5.7.32/data --initialize-insecure --user=pingchas
5.配置Clion
File->Settings->Build-Cmake
修改Cmake Options为: