当前位置:网站首页>Compile and debug mysql8 with clion under MacOS x
Compile and debug mysql8 with clion under MacOS x
2022-04-23 09:41:00 【Dreamer】
Basic environment
operating system :MacOS Monterey( edition 12.2.1) M1 16GB Memory
CLion edition :CLion 2021.2.1
MySQL edition :8.0
First, make sure the system is equipped with cmake, If there is no need to follow... In advance , The author uses brew according to :brew install cmake
CLion Debug configuration
1、 obtain MySQL Source code , The author adopts from github obtain :[email protected]:mysql/mysql-server.git
2、 Create build code storage path , The author chooses to store in the source code build Under the table of contents
3、 To configure CLion Of Cmake The compiled directory of
stay CLion Of Preference -> Build,Excution,Deployment -> CMake -> Build Directory
Choose to create build
Catalog
4、 To configure CLion Of Cmake Compiler parameters for
Need to download one boost, The author uses
https://nchc.dl.sourceforge.net/project/boost/boost/1.73.0/boost_1_73_0.tar.bz2
-DCMAKE_BUILD_TYPE=Debug
-DWITH_BOOST=/Users/zjw/Downloads/boost_1_73_0
-DCMAKE_INSTALL_PREFIX=/Users/zjw/OpenSource/mysql-server/build
# The compilation path and installation path should be consistent
-DMYSQL_DATADIR=/Users/zjw/OpenSource/mysql-server/build/data
# Database initialization path
-DSYSCONFDIR=/Users/zjw/OpenSource/mysql-server/build
-DMYSQL_UNIX_ADDR=/Users/zjw/OpenSource/mysql-server/build/data/mysql.sock
5、 compile MySQL
Build -> Build Project
6、 Database initialization
Requirements ensure that the system has mysql Group and mysql user
cd /Users/zjw/OpenSource/mysql-server/build
./mysqld --basedir=/Users/zjw/OpenSource/mysql-server/build \
--datadir=/Users/zjw/OpenSource/mysql-server/build/data \
--initialize-insecure --user=mysql
7、 Create a data storage directory , And modify file permissions
mkdir build/data
chmod -R 777 /Users/zjw/OpenSource/mysql-server/build/data
8、 To configure mysqld Launch parameters (program arguments)
--basedir=/Users/zjw/OpenSource/mysql-server/build --datadir=/Users/zjw/OpenSource/mysql-server/build/data --user=mysql
9、 Specify the data directory (working directory)
/Users/zjw/OpenSource/mysql-server/build/data
So far, the debugging environment has been built
版权声明
本文为[Dreamer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230933336125.html
边栏推荐
- Two declaration methods of functions of JS
- 如何实现根据照片获取地理位置及如何防御照片泄漏地理位置
- JS prototype chain
- Emuelec compilation summary
- Kettle实验 转换案例
- Kettle实验 (三)
- Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files
- Kernel PWN learning (3) -- ret2user & kernel ROP & qwb2018 core
- 108. 将有序数组转换为二叉搜索树
- Three ways to create objects in JS
猜你喜欢
SAP RFC_ CVI_ EI_ INBOUND_ Main BP master data creation example (Demo customer only)
LeetCode 1611. The minimum number of operations to make an integer 0
Installation of data cleaning ETL tool kettle
kettle庖丁解牛第14篇之JSON输入
[geek challenge 2019] havefun1
JSON input of Chapter 14 of kettle paoding jieniu
MySQL of database -- basic common query commands
Kettle experiment
kernel-pwn学习(4)--Double Fetch&&0CTF2018-baby
ABAP publishes OData service samples from CDs view
随机推荐
Leetcode0587. 安装栅栏(difficult)
Canary publishing using ingress
Distributed message oriented middleware framework selection - Digital Architecture Design (7)
AI上推荐 之 MMOE(多任务yyds)
Emuelec compilation summary
The sap export excel file opens and shows that the file format and extension of "XXX" do not match. The file may be damaged or unsafe. Do not open it unless you trust its source. Do you still want to
112. Path sum
GUI, CLI and UNIX Philosophy
Explanation of order and primitive root of number theory
Redis 内存占满导致的 Setnx 命令执行失败
Applet error: should have URL attribute when using navigateto, redirectto or switchtab
数据清洗 ETL 工具Kettle的安装
Sql1 [geek challenge 2019]
Kettle experiment (III)
Applet error: cannot read property'currenttarget'of undefined
SAP excel has completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
Flutter 的加载动画这么玩更有趣
Setnx command execution failed due to full redis memory
Base de la technologie électronique numérique 3.1 aperçu du circuit de porte, 3.2 circuit de porte à diode semi - conductrice
Learn FPGA (from Verilog to HLS)