当前位置:网站首页>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
边栏推荐
- ABAP implementation publishes restful services for external invocation example
- JS what is an event? Event three elements and operation elements
- Introduction to sap pi / PO login and basic functions
- 3、 6 [Verilog HDL] gate level modeling of basic knowledge
- ABAP publishes OData service samples from CDs view
- Distributed message oriented middleware framework selection - Digital Architecture Design (7)
- 112. 路径总和
- Cloud computing competition -- basic part of 2020 competition [task 3]
- Flutter's loading animation is more interesting
- SAP excel has completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.
猜你喜欢
错题汇总1
Redis exception read error on connection solution
Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files
Go language learning notes - array | go language from scratch
How to obtain geographical location based on photos and how to prevent photos from leaking geographical location
《數字電子技術基礎》3.1 門電路概述、3.2 半導體二極管門電路
Kettle实验 (三)
《信息系统项目管理师总结》第八章 项目干系人管理
kernel-pwn学习(3)--ret2user&&kernel ROP&&QWB2018-core
Where is int a = 1 stored
随机推荐
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
Applet error: cannot read property'currenttarget'of undefined
Kettle实验 (三)
Go language learning notes - structure | go language from scratch
Pre parsing of JS
MySQL of database -- Fundamentals
[SQL Server fast track] view and cursor of database
成功的DevOps Leader 应该清楚的3个挑战
LeetCode 1611. The minimum number of operations to make an integer 0
Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files
DVWA range practice
Single sign on SSO
【读书笔记】《Verilog数字系统设计教程》 第5章 条件语句、循环语句和块语句(附思考题答案)
MySQL - Chapter 1 (data types in MySQL)
Number of islands
阿里云架构师解读四大主流游戏架构
Simply understand = = and equals, why can string not use new
ABAP CDs view with association example
Give the method of instantiating the object to the new object
108. 将有序数组转换为二叉搜索树