4. 配置编译安装
cmake . -DBUILD_CONFIG=mysql_release -DCPACK_MONOLITHIC_INSTALL=ON -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQLX_TCP_PORT=33060 -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DMYSQL_TCP_PORT=3306 -DMYSQLX_UNIX_ADDR=/usr/local/mysql/mysqlx.sock -DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/usr/local/mysql/etc -DENABLE_DOWNLOADS=ON -DWITH_BOOST=system
make -j4
make install
编译完成后,在 MySQL 安装目录生成如下目录结构。drwxr-xr-x 2 root root 4096 Feb 12 04:24 collections/
drwxr-xr-x 4 root root 4096 Feb 12 04:24 extra/
drwxr-xr-x 2 root root 40960 Feb 12 04:24 include/
drwxr-xr-x 4 root root 4096 Feb 12 04:24 lib/
-rw-r--r-- 1 root root 836 Apr 13 2019 lsan.supp
lrwxrwxrwx 1 root root 19 Feb 12 04:24 mtr -> ./mysql-test-run.pl*
-rwxr-xr-x 1 root root 36862 Apr 13 2019 mysql-stress-test.pl*
lrwxrwxrwx 1 root root 19 Feb 12 04:24 mysql-test-run -> ./mysql-test-run.pl*
-rwxr-xr-x 1 root root 220158 Apr 13 2019 mysql-test-run.pl*
drwxr-xr-x 2 root root 65536 Feb 16 10:22 r/
drwxr-xr-x 7 root root 12288 Feb 12 04:24 std_data/
drwxr-xr-x 46 root root 4096 Feb 12 04:24 suite/
drwxr-xr-x 2 root root 77824 Feb 16 10:22 t/
-rw-r--r-- 1 root root 29730 Apr 13 2019 valgrind.supp
drwxr-xr-x 9 root root 4096 Mar 5 08:40 var/