易截截图软件、单文件、免安装、纯绿色、仅160KB

利旧原来安装的XAMPP,但使MySQL支持Transaction

 一直使用Mysql,最近才了解到Mysql支持了Transaction。老了,跟不少潮流了。
那就把原来的应用改成Based On Transaction的吧。
将建表语句改成Engine=InnoDB,好像还是不行,没有想象中那么简单。
查一查,哦,发现XAMPP安装的Mysql还要修改conf文件:
XAMPP from Apache Friends is a collection of free open source apps that make it easy to install Apache distribution containing MySQL, PHP and Perl. There are four XAMPP distributions for Windows, Linux , Mac OS X and 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. 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.
However, by default, InnoDB MySQL database storage engine is not enabled in the my.cnf configuration file. 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.
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.
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
skip-innodb
- Uncomment the following options for InnoDB database if you are using InnoDB tables.
#innodb_data_home_dir = C:/xampp/xampp/mysql/data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:/xampp/xampp/mysql/data/
#innodb_log_arch_dir = C:/xampp/xampp/mysql/data/
- 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.
#set-variable = innodb


相关文档:

Nagios:监控Mysql服务器

时间:2009-03-12 12:38:24  来源:Linux联盟
  作者:
 来源:it168.com
   
    作者:田逸(sery@163.com)
    俗话说:工欲善其事,必先利其器.要做好系统管理,使自己的工作更轻松更有效的话,一个好的监控工具是必不可少的了。在这里我向 ......

MySQL的timestamp类型自动更新问题

 注:本文讨论的范围为未启用MAXDB模式的表!
    今天建了一个表,里面有一个列是timestamp类型,我本意是在数据更新时,这个字段的时间能自动更新。岂知对这个类型的值还不甚了解,导致出错。发现这个字段只是在这行数据建立的时候有值,在更新的却无变化。
    查找资料,发现是我 ......

mysql 找回密码

 
1.  停到运行的mysql:    /etc/init.d/mysql stop
2.  使用skip-grant-tables这个选项启动MySQL:  /usr/bin/mysqld_safe --skip-grant-tables &
3.  现在可以不用密码进入mysql 了。
     #  myql
    >   ......

MySql 备份与恢复

 本文讨论 MySQL 的备份和恢复机制,以及如何维护数据表,包括最主要的两种表类型:MyISAM 和 Innodb,文中设计的 MySQL 版本为 5.0.22。
目前 MySQL 支持的免费备份工具有:mysqldump、mysqlhotcopy,还可以用 SQL 语法进行备份:BACKUP TABLE 或者 SELECT INTO OUTFILE,又或者备份二进制日志(binlog),还可以是 ......

用mysqldumpslow分析mysql的slow query log

mysql有一个功能就是可以log下来运行的比较慢的sql语句,默认是没有这个log的,为了开启这个功能,
要修改my.cnf或者在mysql启动的时候加入一些参数。如果在my.cnf里面修改,需增加如下几行
long_query_time = 1
log-slow-queries = /var/youpath/slow.log
log-queries-not-using-indexes
long_query_time 是指执 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号