git clone [email protected]:mysql/mysql-server.git
sudo apt-get install make cmake gcc g++ bison libncurses5-dev build-essential -y
sudo apt-get install libssl-dev -y
mkdir -pv ~/mysql-build
cd mysql-build
cmake ~/mysql-server -DDEBUG=1 -DWITH_BOOST=~/boost
make -j 4
sudo apt update
# install 官方 lib 库
sudo apt-get install libmysqld-dev -y
sudo apt-get install libmysql++-dev
# cmake option
-DCMAKE_BUILD_TYPE=Debug --DWITH_BOOST=~/boost/boost_1_69_0
/home/lin/mysql-server/cmake-build-debug/runtime_output_directory/mysqld -uroot --initialize-insecure
/home/lin/mysql-server/cmake-build-debug/runtime_output_directory/mysqld -uroot -P33060
# 启动后,默认端口为 33060
# 可通过以下命令进行查看
lsof -i | grep 33060