MySQL内核正确的编译操作流程

数据库 MySQL
以下的文章主要是对MySQL内核编译的介绍,如果你对其相关的实际操作有兴趣了解的话,以下的文章将会给你提供相关的知识。

编译MySQL内核是我们经常用到的,以下的文章主要是介绍编译MySQL内核的正确方法,如果你对编译MySQL内核技术,心存好奇的话,以下的文章将会揭开它的神秘面纱。希望会给你带来一些帮助在此方面。

关键字: MySQL内核 数据库安全配置 用户认证模块 密码恢复 存储过程编写 数据库索引

内容摘要:

在***的版本中,windows环境与linux环境下使用一套代码。本文以mysql-5.1.7作为分析的对象,详细讲解编译MySQL内核的方法。

在***的版本中,windows环境与linux环境下使用一套代码。比如mysql-6.0.4-alpha版本中的INSTALL-WIN-SOURCE文件的描述:

 

  1. TobuildMySQLonWindowsfromsource,youmustsatisfythe  
  2. followingsystem,compiler,andresourcerequirements:  
  3. *Windows2000,WindowsXP,ornewerversion.WindowsVistais  
  4. notsupporteduntilMicrosoftcertifiesVisualStudio2005on  
  5. Vista.  
  6. *CMake,whichcanbedownloadedfromhttp://www.cmake.org.  
  7. Afterinstalling,modifyyourpathtoincludethecmake  
  8. binary.  
  9. *MicrosoftVisualC++2005ExpressEdition,VisualStudio.Net  
  10. 2003(7.1),orVisualStudio2005(8.0)compilersystem.  
  11. *IfyouareusingVisualC++2005ExpressEdition,youmust  
  12. alsoinstallanappropriatePlatformSDK.Moreinformationand  
  13. linkstodownloadsforvariousWindowsplatformsisavailable  
  14. fromhttp://msdn.microsoft.com/platformsdk/.  
  15. *IfyouarecompilingfromaBitKeepertreeormakingchanges  
  16. totheparser,youneedbisonforWindows,whichcanbe  
  17. downloadedfrom  
  18. http://gnuwin32.sourceforge.net/packages/bison.htm.Download  
  19. thepackagelabeled"Completepackage,excludingsources".  
  20. Afterinstallingthepackage,modifyyourpathtoincludethe  
  21. bisonbinaryandensurethatthisbinaryisaccessiblefrom  
  22. VisualStudio.  
  23. *Cygwinmightbenecessaryifyouwanttorunthetestscript  
  24. orpackagethecompiledbinariesandsupportfilesintoaZip  
  25. archive.(Cygwinisneededonlytotestorpackagethe  
  26. distribution,nottobuildit.)Cygwinisavailablefrom  
  27. http://cygwin.com.  
  28. *3GBto5GBofdiskspace. 

 

通过这样的方法,生成项目文件,从而可以通过vs工具进行编译。在先前的版本中,windows下的代码和linux下的代码是两个压缩包,比如windows下的一个软件包名为,mysql-5.1.7-beta-win-src.zip。

详细讲解如何编译MySQL内核:这里我选择5.1.7作为分析的对象。

安装代码的步骤:

1.解压缩文件包mysql-5.1.7-beta-win-src.zip。

2.使用vs2003打开项目文件mysql.sln。

3.设置mysqld项目为启动项目。

4.在mysqld的属性页设置命令参数为:--console。这样就可以用debug方式调试代码了。

 

配置命令参数

5.设置断点,比如查询的总入口是handle_select函数。

6.编译mysql项目,将会在mysql-5.1.7-betaclient_debug目录下生成mysql.exe。

7.使用“启动新实例”或者“进入单步执行新实例”进行调试。

 

执行调试操作

8. mysql-5.1.7-betaclient_debug目录下生成mysql.exe,执行语句,将会执行到断点进行调试。

 

进入调试状态

9.相应的数据文件,见mysql-5.1.7-betadata目录。

上述的相关内容就是对详细讲解如何编译MySQL内核的描述,希望会给你带来一些帮助在此方面。

【编辑推荐】

  1. Mysql大小写中易出现的问题的解决
  2. MySQL隐藏空间相关问题的解答
  3. MySQL数据库命令的基础简介
  4. MySQL数字类型中的三种常用种类
  5. MySQL 5.0基础的基本内容的介绍

 

责任编辑:佚名 来源: 博客园
相关推荐

2010-05-26 09:21:13

MySQL命令

2010-06-04 19:15:42

MySQL安装

2010-05-24 17:12:23

连接MYSQL

2010-05-26 11:21:00

MySQL数据库操作

2010-05-25 09:47:05

2010-06-04 15:47:46

MySQL初始化roo

2010-05-13 14:27:52

访问MySQL

2010-07-20 16:05:27

SQL Server补

2010-05-13 09:49:08

MySQL调优

2011-01-14 16:51:44

Linux内核

2010-05-11 11:18:06

Mysql mysql

2010-06-13 15:10:49

MySQL loadd

2011-05-06 17:43:53

硒鼓

2010-08-18 14:10:38

DB2入门

2010-05-24 13:04:55

MySQL 事件调度器

2010-05-12 09:57:17

MySQL

2010-08-04 10:03:37

DB2 9 分布式管理

2010-08-06 18:01:13

DB2数据备份

2010-06-01 12:51:23

MySQL数据库

2021-05-26 07:53:58

Linux运维Linux系统
点赞
收藏

51CTO技术栈公众号