Enable MySQL InnoDB Storage Engine Support in XAMPP Installation使MySQL的InnoDB存儲引擎支持在xampp安裝
XAMPP from Apache Friends xampp從Apache的朋友 is a collection of free open source apps that make it easy to install Apache distribution containing MySQL, PHP and Perl.是一家集免費的開放源代碼應用程序,這樣更容易安裝的Apache分佈含有的MySQL , PHP的和Perl 。 There are four XAMPP distributions for Windows, Linux, Mac OS X and Solaris.有四個xampp分佈在Windows , Linux , Mac OS X和Solaris操作系統。 To set up an Apache web server with XAMPP, simply download and extract XAMPP, and the Apache HTTPD web server is ready after one or two more auto-execute scripts.成立一個Apache Web服務器與xampp ,只要下載並解壓縮xampp ,和Apache的httpd Web服務器準備後,一個或兩個更多的自動執行腳本。 There are no changes to the Windows registry (unless you’re using Widows installer version of XAMPP) and it’s not necessary to edit any configuration files.有沒有改變Windows註冊表(除非您使用的寡婦Installer版本的xampp )和它的沒有必要修改任何配置文件。
However, by default, InnoDB MySQL database storage engine is not enabled in the my.cnf configuration file.不過,默認情況下, InnoDB的MySQL數據庫存儲引擎是未啟用,在my.cnf配置文件。 If a webmaster plans to use InnoDB features, such as one to many or many to many table relationships on foreign key constraints, or transaction-safe commands such as commit, rollback and crash recovery capabilities.如果一個網站管理員計劃使用InnoDB的功能,例如一到,許多國家或許多許多表的關係,對外國的主要制約因素,或交易安全的命令,如承諾,回滾和崩潰恢復能力。
To enable the support of MySQL server on InnoDB storage engine, locate the “my.cnf” config file (normally in / installation_path /xampp/mysql/bin/ directory), and edit the my.cnf with any text editor such as vi.使支持MySQL服務器對InnoDB存儲引擎,找到“ my.cnf ” config文件中(通常在/ installation_path / xampp / MySQL的/斌/目錄) ,和編輯my.cnf與任何文本編輯器,如六。
Search and locate each of the following lines (except the lines in italic where they’re comments):搜索並找到下列各線(除線, 斜體 ,他們正在評論) :
- Comment the following line to unskip and use InnoDB -評論以下行u nskip和使用I nnoDB的
skip-innodb跳過- InnoDB的- Uncomment the following options for InnoDB database if you are using InnoDB tables. -取消對下列選項為I nnoDB數據庫如果您使用的I nnoDB表。
#innodb_data_home_dir = C:/xampp/xampp/mysql/data/ # innodb_data_home_dir = C的: / xampp / xampp / MySQL的/數據/
#innodb_data_file_path = ibdata1:10M:autoextend # innodb_data_file_path = ibdata1 :十米: autoextend
#innodb_log_group_home_dir = C:/xampp/xampp/mysql/data/ # innodb_log_group_home_dir = C的: / xampp / xampp / MySQL的/數據/
#innodb_log_arch_dir = C:/xampp/xampp/mysql/data/ # innodb_log_arch_dir = C的: / xampp / xampp / MySQL的/數據/- Uncomment the lines and set innodb_buffer_pool_size up to 50% - 80% of RAM for optimization of InnoDB databases, try not to memory usage too high. -取消對線和設置i nnodb_buffer_pool_size高達5 0% - 80 %的R A M用於優化In noDB的數據庫,請盡量不要記憶體使用量過高。
#set-variable = innodb_buffer_pool_size=16M #設置變量= innodb_buffer_pool_size =十六米
#set-variable = innodb_additional_mem_pool_size=2M #設置變量= innodb_additional_mem_pool_size = 2米- Uncomment the lines and set innodb_log_file_size to 25% of InnoDB buffer pool size for optimisation. -取消對線和設置i nnodb_log_file_size至2 5%的I nnoDB的緩衝池大小的優化。
#set-variable = innodb_log_file_size=5M #設置變量= innodb_log_file_size =五米
#set-variable = innodb_log_buffer_size=8M #設置變量= innodb_log_buffer_size = 8米
#innodb_flush_log_at_trx_commit=1 # innodb_flush_log_at_trx_commit = 1
#set-variable = innodb_lock_wait_timeout=50 #設置變量= innodb_lock_wait_timeout = 50
After modification, the code for each lines should look like this:改造後,代碼為每個線看起來應該是這樣的:
# skip-innodb #跳過- InnoDB的
innodb_data_home_dir = C:/xampp/xampp/mysql/data/ innodb_data_home_dir = C的: / xampp / xampp / MySQL的/數據/
innodb_data_file_path = ibdata1:10M:autoextend innodb_data_file_path = ibdata1 :十米: autoextend
innodb_log_group_home_dir = C:/xampp/xampp/mysql/data/ innodb_log_group_home_dir = C的: / xampp / xampp / MySQL的/數據/
innodb_log_arch_dir = C:/xampp/xampp/mysql/data/ innodb_log_arch_dir = C的: / xampp / xampp / MySQL的/數據/set-variable = innodb_buffer_pool_size=16M設置變量= innodb_buffer_pool_size =一六米
set-variable = innodb_additional_mem_pool_size=2M設置變量= innodb_additional_mem_pool_size =二米set-variable = innodb_log_file_size=5M設置變量= innodb_log_file_size =五米
set-variable = innodb_log_buffer_size=8M設置變量= innodb_log_buffer_size = 8米
innodb_flush_log_at_trx_commit=1 innodb_flush_log_at_trx_commit = 1
set-variable = innodb_lock_wait_timeout=50設置變量= innodb_lock_wait_timeout = 50
When InnoDB is not enable and MySQL uses MyISAM database storage engine instead, some errors that may be returned include:當InnoDB是,不能讓和MySQL使用myisam數據庫存儲引擎,而是一些錯誤,可能會返回包括:
Undefined GET property or variable in ‘A_Class’ class: A_Class_Object未定義獲得的財產或變量在' a_class級: a_class_object
Fatal error: Call to undefined method Object::Function() in /xampp/htdocs/wwwroot/a_page.php on line 87致命錯誤:調用未定義的方法,對象: :函數( )在/ xampp / htdocs /在Wwwroot / a_page.php上線87
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要說明 :這是一個機器翻譯網頁是“按原樣”提供的擔保。 Machine translation may be difficult to understand.機器翻譯可能很難理解。 Please refer to請參閱 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和貢獻,或取得技術的支持和幫助,在 My Digital Life Forums 我的數字生活論壇 . 。
Related Articles相關文章
- Easily Set Up Web Server with XAMPP很容易成立的Web伺服器與xampp
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4安裝Web服務器在Windows XP的Apache2 , php5和mysql4 -第4部分
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3安裝Web服務器在FreeBSD的6.0與2.2的Apache , MySQL 5.0的和PHP 5 -第3部分
- WordPress Permalinks Does Not Work in xampp Setup在WordPress永久不工作, xampp安裝
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database啟用日誌記錄慢查詢(慢速查詢日誌)在MySQL數據庫
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5安裝Web服務器在FreeBSD的6.0與2.2的Apache , MySQL 5.0的和PHP 5 -第5部分
- Change or Set MySQL Long Query Time Value for log-slow-queries改變或設置MySQL的長期查詢時間價值為登錄慢的疑問
- How to Backup and Restore (Export and Import) MySQL Databases Tutorial如何備份和恢復(出口和進口)的MySQL數據庫補習
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1安裝Web服務器在Windows XP的Apache2 , php5和mysql4 -第1部分
- MySQL Database Performance Tuning Best Practices Video Tutorial MySQL數據庫性能調整的最佳做法視頻教程



















March 1st, 2008 03:08 2008年3月1日3時08分
I needed to activate innoDB for using activeCollab.我需要激活InnoDB的使用activecollab 。 Your article helped me a lot.您的文章幫了我很多。 It was very well written.Thanx.這是很好的written.thanx 。
April 12th, 2008 21:54 2008年4月12日21時54分
This helps me a lot.這可以幫助我很多。 Thank you!謝謝您!
April 24th, 2008 23:47 2008年4月24日23時47分
Very helpful, thank you!非常有幫助,謝謝!
May 4th, 2008 23:08 2008年5月4日23時08分
Thanks, you saved me a lots of searching謝謝您,您救了我一地段的搜索
May 15th, 2008 03:16 2008年5月15日3時16分
I tried the above but whatever changes i made to my.cnf file in apachefriends folder, nothing was working.我嘗試上述的變化,但無論我到my.cnf文件中apachefriends文件夾,沒有工作。 The following worked for me:下面的工作對我來說:
1. 1 。 If you have MYSQL SYSTEM TRAY MONITOR installed on your machine (it is bundled with MYSQL QUERY BROWSER), launch it - you will see a little icon on the notification task bar on your windows machine.如果你有MySQL的系統托盤監察您的計算機上安裝(這是與MySQL捆綁銷售,查詢瀏覽器) ,發射它-您會看到一個小圖標,就通知任務欄在你的W indows機器。
2. 2 。 Right click it and choose “Configure instance”.右鍵單擊它並選擇“配置,例如” 。
3. 3 。 Select “Startup Variables” on the left item listings.選擇“啟動變數”就在左邊的項目列表。
4. 4 。 Toggle to “InnoDB Parameters” tab.切換到“ InnoDB的參數”標籤。 Select “Activate InnoDB”.選擇“激活InnoDB的” 。 You will notice all your settings are disabled.( to change your settings/uncomment as mentioned above, follow the next steps)您會發現您所有的設置被禁用。 (更改您的設置/取消如上所述,後續的下一步驟)
5. 5 。 At the footer of the InnoDB tab window you will see a label:在頁腳的InnoDB的標籤窗口,您會看到一個標籤:
Options file: C:\WINDOWS\my.ini選擇文件: c : \的Windows \ my.ini
Section: mysqld區段: mysqld
So this is where my configuration file was located.因此,這是我的配置文件位於。 This ini file took precedent over the apachefriends folder > my.cnf.這個ini文件了先例,超過apachefriends文件夾> my.cnf 。 Locate this file and simply follow the uncommenting procedure of this post and save.找到這個文件,並只需按照uncommenting的程序,這個職位和保存。
6. 6 。 Stop the mysql service by right clicking on the Monitor tray again.停止MySQL的服務,按一下滑鼠右鍵,就監視器托盤。 Select “Shutdown Instance”.選擇“關機,例如” 。
7. 7 。 Right click again and Select “Start Instance”.按一下滑鼠右鍵,再選擇“開始,例如” 。
8. 8 。 Now you will see all your InnoDB variables settings.現在您將看到您所有的InnoDB的變量設置。
May 15th, 2008 03:25 2008年5月15日3時25分
[...] [ … … ] http://www.mydigitallife.info [...] [ … … ]
May 22nd, 2008 22:01 2008年5月22日22時01分
Thank you, your article was very comperhensive.謝謝您的文章是非常的綜合。
It helped me alot.它幫助我很多。
May 25th, 2008 15:02 2008年5月25日15時02分
For those who had my problem.對於那些誰了我的問題。 If you couldnt find a my.cnf file, instead you find a shortcut looking icon named ‘my’.如果您couldnt找到一個my.cnf文件,而不是您找到一條捷徑尋找圖標名為'我' 。
This is the my.cnf file!!這是my.cnf文件!
I couldnt right click ‘open with’, instead I opened it by opening a ext editor and file->open->my. i couldnt右鍵點擊'打開' ,而不是我打開它的開放一分機編輯器和文件> “打開” ->我的。
Then follow above.然後按照以上。
May 25th, 2008 15:12 2008年5月25日15時12分
Except my my.cnf was this: (it worked all the same)除了我的my.cnf是: (它的工作都一樣)
#skip-innodb #跳過- InnoDB的
innodb_data_home_dir = “C:/xampp/mysql/” innodb_data_home_dir =的“ C : / xampp / MySQL的/ ”
innodb_data_file_path = ibdata1:10M:autoextend innodb_data_file_path = ibdata1 :十米: autoextend
innodb_log_group_home_dir = “C:/xampp/mysql/” innodb_log_group_home_dir =的“ C : / xampp / MySQL的/ ”
innodb_log_arch_dir = “C:/xampp/mysql/” innodb_log_arch_dir =的“ C : / xampp / MySQL的/ ”
innodb_buffer_pool_size = 16M innodb_buffer_pool_size =一十六米
innodb_additional_mem_pool_size = 2M innodb_additional_mem_pool_size =二米
innodb_log_file_size = 5M innodb_log_file_size =五米
innodb_log_buffer_size = 8M innodb_log_buffer_size = 8米
innodb_flush_log_at_trx_commit = 1 innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50 innodb_lock_wait_timeout = 50
June 29th, 2008 16:55 2008年6月29日16時55分
I have configured your instruction.我已設定的指示。 But, until my InnoDB database storage engine doesn’t working.但是,直到我InnoDB數據庫存儲引擎不工作。 Also i restarted my mysql sever.也i重新啟動我的MySQL斷絕。
July 2nd, 2008 18:30 2008年7月2日18時30分
[...] Enable MySQL InnoDB Storage Engine Support in XAMPP Installation » My Digital Life Habilitando o InnoDB e permitindo o MySQL funcionar com recursos de relacionamento e orientação (tags: mysql innodb relacionamento) [...] [ … … ] ,使MySQL的InnoDB存儲引擎支持在xampp安裝»我的數字生活habilitando o InnoDB的e permitindo o MySQL的funcionar的COM recursos德relacionamento e orientação (標籤: MySQL的InnoDB的relacionamento ) [ … … ]
July 9th, 2008 20:13 2008年7月9日20時13分
hi,嗨,
i folowed the steps which you mentionen above, also i changed in my.cnf file and restarted the apachi and mysql. i folowed哪些步驟,你mentionen以上,還我改變在my.cnf文件,並重新啟動apachi和MySQL 。 But i could not get innodb in the table type dropdown box.但我無法取得InnoDB也可以在表格中輸入下拉框。