您正在查看 "Mysql Manual" 分类下的文章
2009-10-29 16:07
2009-10-22 23:31
2009-10-10 16:59
2009-09-10 22:28
2009-04-09 15:04
一、案例
如表table:
NAME PACKNO UNITPRICE
A 1 2
A 3 4
B 5 6
B 7 8
如何得到如下结果
NAME SUM
A |
2009-04-04 15:12
一、调整table cache
table_cache 参数设置表高速缓存的数目。每个连接进来,都会至少打开一个表缓存。因此, table_cache 的大小应与 max_connections 的设置有关。例如,对于 200 个并行运行的连接,应该让表的缓存至少有 200 × N ,这里 N 是应用可以执行的查询的一个联接中表的最大数量。此外,还需要为临时表和文件保留一些额外的文件描述符。
当 Mysql 访问一个表时,如果该表在缓存中已经被打开,则可以直接访问缓存;如果还没有被缓存,但是在 Mysql 表缓冲区中还有空间 |
2009-03-18 15:31
alter table table_name auto_increment=n;
如:alter table pb_threads AUTO_INCREMENT=1; |
2009-03-17 17:32
2009-03-17 11:57
1,容易发生错误的设置:
log_slow_queries = ON
log_slow_queries=/var/log/slow-queries.log
long_query_time=5
这种容易导致slow-queries.log无法读取的错误(权限问题)。
常见错误提示:
[ERROR] Could not use /var/log/slow-queries.log for
logging (error 13). Turning logging off for the whole duration of the
MySQL server process. To turn it on again: fix the cause, shu |
2009-03-17 11:51
1,查看Mysqld(/var/log/mysqld.log)日志,发现以下错误:
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0
5242880 bytes
InnoDB: than specified in the .cnf file 0 104857600 bytes!
030826 1:42:15 Can't init databases
030826 1:42:15 Aborting
2,解决办法
"
If you want to change the number or the size o |
|
|