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也可以在表格中输入下拉框。