新聞中心
編譯MySQL內(nèi)核是我們經(jīng)常用到的,以下的文章主要是介紹編譯MySQL內(nèi)核的正確方法,如果你對(duì)編譯MySQL內(nèi)核技術(shù),心存好奇的話,以下的文章將會(huì)揭開它的神秘面紗。希望會(huì)給你帶來一些幫助在此方面。

創(chuàng)新互聯(lián)公司主營宜賓網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,成都APP應(yīng)用開發(fā),宜賓h5重慶小程序開發(fā)搭建,宜賓網(wǎng)站營銷推廣歡迎宜賓等地區(qū)企業(yè)咨詢
關(guān)鍵字: MySQL內(nèi)核 數(shù)據(jù)庫安全配置 用戶認(rèn)證模塊 密碼恢復(fù) 存儲(chǔ)過程編寫 數(shù)據(jù)庫索引
內(nèi)容摘要:
在***的版本中,windows環(huán)境與linux環(huán)境下使用一套代碼。本文以mysql-5.1.7作為分析的對(duì)象,詳細(xì)講解編譯MySQL內(nèi)核的方法。
在***的版本中,windows環(huán)境與linux環(huán)境下使用一套代碼。比如mysql-6.0.4-alpha版本中的INSTALL-WIN-SOURCE文件的描述:
- TobuildMySQLonWindowsfromsource,youmustsatisfythe
- followingsystem,compiler,andresourcerequirements:
- *Windows2000,WindowsXP,ornewerversion.WindowsVistais
- notsupporteduntilMicrosoftcertifiesVisualStudio2005on
- Vista.
- *CMake,whichcanbedownloadedfromhttp://www.cmake.org.
- Afterinstalling,modifyyourpathtoincludethecmake
- binary.
- *MicrosoftVisualC++2005ExpressEdition,VisualStudio.Net
- 2003(7.1),orVisualStudio2005(8.0)compilersystem.
- *IfyouareusingVisualC++2005ExpressEdition,youmust
- alsoinstallanappropriatePlatformSDK.Moreinformationand
- linkstodownloadsforvariousWindowsplatformsisavailable
- fromhttp://msdn.microsoft.com/platformsdk/.
- *IfyouarecompilingfromaBitKeepertreeormakingchanges
- totheparser,youneedbisonforWindows,whichcanbe
- downloadedfrom
- http://gnuwin32.sourceforge.net/packages/bison.htm.Download
- thepackagelabeled"Completepackage,excludingsources".
- Afterinstallingthepackage,modifyyourpathtoincludethe
- bisonbinaryandensurethatthisbinaryisaccessiblefrom
- VisualStudio.
- *Cygwinmightbenecessaryifyouwanttorunthetestscript
- orpackagethecompiledbinariesandsupportfilesintoaZip
- archive.(Cygwinisneededonlytotestorpackagethe
- distribution,nottobuildit.)Cygwinisavailablefrom
- http://cygwin.com.
- *3GBto5GBofdiskspace.
通過這樣的方法,生成項(xiàng)目文件,從而可以通過vs工具進(jìn)行編譯。在先前的版本中,windows下的代碼和linux下的代碼是兩個(gè)壓縮包,比如windows下的一個(gè)軟件包名為,mysql-5.1.7-beta-win-src.zip。
詳細(xì)講解如何編譯MySQL內(nèi)核:這里我選擇5.1.7作為分析的對(duì)象。
安裝代碼的步驟:
1.解壓縮文件包mysql-5.1.7-beta-win-src.zip。
2.使用vs2003打開項(xiàng)目文件mysql.sln。
3.設(shè)置mysqld項(xiàng)目為啟動(dòng)項(xiàng)目。
4.在mysqld的屬性頁設(shè)置命令參數(shù)為:--console。這樣就可以用debug方式調(diào)試代碼了。
配置命令參數(shù)
5.設(shè)置斷點(diǎn),比如查詢的總?cè)肟谑莌andle_select函數(shù)。
6.編譯mysql項(xiàng)目,將會(huì)在mysql-5.1.7-betaclient_debug目錄下生成mysql.exe。
7.使用“啟動(dòng)新實(shí)例”或者“進(jìn)入單步執(zhí)行新實(shí)例”進(jìn)行調(diào)試。
執(zhí)行調(diào)試操作
8. mysql-5.1.7-betaclient_debug目錄下生成mysql.exe,執(zhí)行語句,將會(huì)執(zhí)行到斷點(diǎn)進(jìn)行調(diào)試。
進(jìn)入調(diào)試狀態(tài)
9.相應(yīng)的數(shù)據(jù)文件,見mysql-5.1.7-betadata目錄。
上述的相關(guān)內(nèi)容就是對(duì)詳細(xì)講解如何編譯MySQL內(nèi)核的描述,希望會(huì)給你帶來一些幫助在此方面。
當(dāng)前題目:MySQL內(nèi)核正確的編譯操作流程
標(biāo)題路徑:http://www.dlmjj.cn/article/djhpjoi.html


咨詢
建站咨詢
