cmake for MySQL

cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/michael/install/3306 -DMYSQL_DATADIR=/home/michael/install/3306/var -DINSTALL_SBINDIR=libexec -DINSTALL_LIBDIR=lib/mysql -DSYSCONFDIR=/home/michael/install/3306/etc -DMYSQL_UNIX_ADDR=/home/michael/install/3306/tmp/mysql.sock -DINSTALL_PLUGINDIR=lib/plugin -DINSTALL_SCRIPTDIR=bin -DINSTALL_MYSQLSHAREDIR=share -DINSTALL_SUPPORTFILESDIR=share/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_UNIT_TESTS=0 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_INNODB_MEMCACHED=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=0 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_EMBEDDED_SERVER=0 -DENABLED_PROFILING=1 -DWITH_ZLIB=bundled -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/home/michael/install/third_lib/boost_1_59_0 -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3 -DCMAKE_C_FLAGS_RELEASE=-O3 -DCMAKE_CXX_FLAGS_RELEASE=-O3 -DENABLED_LOCAL_INFILE=1 -DWITH_DEBUG=0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure! Here are the steps to compile and install MySQL 8.0 on Linux: 1. Download the MySQL source code from the MySQL website. Make sure to choose the appropriate package for your Linux distribution. 2. Install the necessary dependencies. This may vary depending on your Linux distribution, but typically, you will need packages like `build-essential`, `cmake`, `libssl-dev`, `libncurses5-dev`, `libboost-dev`, etc. You can use your package manager (e.g., apt-get, yum) to install them. 3. Extract the downloaded MySQL source code package. 4. Create a build directory and navigate into it: ``` mkdir mysql-build cd mysql-build ``` 5. Configure the build using cmake. Replace `<path-to-source-directory>` with the path to the extracted MySQL source code: ``` cmake <path-to-source-directory> ``` 6. Build MySQL using make: ``` make ``` 7. Install MySQL: ``` sudo make install ``` 8. Initialize the MySQL data directory: ``` sudo mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data ``` 9. Set the ownership and permissions for the MySQL data directory: ``` sudo chown -R mysql:mysql /usr/local/mysql/data sudo chmod -R 750 /usr/local/mysql/data ``` 10. Start the MySQL server: ``` sudo /usr/local/mysql/support-files/mysql.server start ``` 11. Secure the installation by running the MySQL secure installation script: ``` sudo mysql_secure_installation ``` 12. Follow the prompts to set a root password, remove anonymous users, disable remote root login, etc. That's it! You have successfully compiled and installed MySQL 8.0 on your Linux system.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值