摘要: 一:MySQL中MyISAM表损坏原因总结:1、 服务器突然断电导致数据文件损坏;强制关机,没有先关闭mysql 服务;mysqld 进程在写表时被杀掉。2、 磁盘损坏。3、 服务器死机。4、 mysql 本身的bug 。二:MySQL中MyISAM表损坏的症状总结:1 、查询数据时报出错误:Incorrect key file for table: '...'. Try to repair it2 、查询不能在表中找到行或返回不完全的数据。3 、Error: Table '...' is marked as crashed and should be repa 阅读全文
posted @ 2012-09-11 15:33 Jake.Xu 阅读(2072) 评论(0) 推荐(0) 编辑
摘要: 1、一种方法是可以设置表或行的collation,使其为binary或case sensitive。在MySQL中,对于Column Collate其约定的命名方法如下:*_bin: 表示的是binary case sensitive collation,也就是说是区分大小写的*_cs: case sensitive collation,区分大小写*_ci: case insensitive collation,不区分大小写############ Start binary collation example###########mysql> create table case_bin_ 阅读全文
posted @ 2012-09-11 15:24 Jake.Xu 阅读(38738) 评论(0) 推荐(1) 编辑
摘要: MySQL从5.1.4版开始带有一个压力测试工具mysqlslap,通过模拟多个并发客户端访问mysql来执行测试,使用起来非常的简单。通过mysqlslap -help可以获得可用的选项,这里列一些主要的参数,更详细的说明参考官方手册。man mysqlslap 也可以看到有下面一条示例:mysqlslap--delimiter=";"--create="CREATETABLEa(bint);INSERTINTOaVALUES(23)"--query="SELECT*FROMa"--concurrency=50--iteration 阅读全文
posted @ 2012-09-11 15:17 Jake.Xu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: INTEGER,INT,SMALLINT,TINYINT,MEDIUMINT,BIGINTMySQL supports the SQL standard integer typesINTEGER(orINT) andSMALLINT. As an extension to the standard, MySQL also supports the integer typesTINYINT,MEDIUMINT, andBIGINT. The following table shows the required storage and range for each integer type.Typ 阅读全文
posted @ 2012-09-11 13:35 Jake.Xu 阅读(1350) 评论(0) 推荐(0) 编辑