我要评分
获取效率
正确性
完整性
易理解

MySQL Recompilation Failure After Clearance

Symptom

MySQL fails to be compiled. After clearance, MySQL fails to be compiled again, and the message "No such file or directory" is displayed.

Key Process and Cause Analysis

The directory contains residual files generated during previous MySQL compilation. As a result, the MySQL compilation fails.

Conclusion and Solution

If MySQL has been compiled before, delete the files generated during previous MySQL compilation.

  1. Delete the directory generated after the MySQL package is decompressed.
    rm -rf mysql-8.0.25
  2. Decompress the MySQL source package.
    tar -zxvf mysql-boost-8.0.17.tar.gz
  3. Compile MySQL.
    cd mysql-8.0.25
    mkdir build
    cd build
    cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data -DWITH_BOOST=/home/mysql-8.0.17/boost/boost_1_69_0
    make -j 96
    make -j 96 install