Mar
18
2009
1、用find /yourpath mtime +n -exec rm {} \;删除的,这样虽然把文件给删除了,但是控制文件里记录还存在,备份归档就会出错,备份前还得再执行一次crosscheck archivelog all,
2、run{
backup archivelog until time ’sysdate-3′ delete input;
backup archivelog from time ’sysdate-3′ until time ’sysdate’;
}
3、
backup archivelog all;
delete noprompt archivelog until time ’sysdate-3′;
Share This
Feb
10
2009
年初的时候收藏过一篇关于mysqlreport的报表解读,和内置的show status,和show variables相比mysqlreport输出一个可读性更好的报表;但Sundry MySQL提供的脚本相比mysqlreport更进一步:除了报表还进一步提供了修改建议。安装和使用非常简单:
Continue Reading »
Share This
May
27
2008
运行vbb登陆后台admincp时,mysql返回 #1114 - The table ‘xxxx’ is full
由于内存表的大小超过了规定的范围
网上提到的有两种解决方法,
一种是修改tmp_table_size参数,另外一种是修改max_heap_table_size参数。。。
[root@localhost etc]# vi /etc/rc.d/init.d/mysql
找到
$bindir/mysqld_safe –datadir=$datadir –pid-file=$pid_file >/dev/null 2>&1 &
修改为
$bindir/mysqld_safe –datadir=$datadir –pid-file=$pid_file -O tmp_table_size=64M -O max_heap_table_size=32M >/dev/null 2>&1 &
-
重启mysql
[root@localhost etc]# /usr/bin/mysqladmin -u root -p shutdown
Enter password:
[root@localhost etc]# /etc/init.d/mysql start
[root@localhost etc]# mysql
-
查看是否己修改
mysql> show variables like ‘%max_heap_table_size%’;
+———————+———-+
| Variable_name | Value |
+———————+———-+
| max_heap_table_size | 33553408 |
+———————+———-+
1 row in set (0.00 sec)
mysql> show variables like ‘%tmp_table_size%’;
+—————-+———-+
| Variable_name | Value |
+—————-+———-+
| tmp_table_size | 67108864 |
+—————-+———-+
1 row in set (0.00 sec)
己经修改成功!
Share This
May
07
2008
MySQL中文实验室 ,主要对Cluster及优化有不少好文章,其中MySQL Cluster 配置 是特色产品,输入你的硬件配置,会输出推荐的config配置。
MySQL中文网 关于MYSQL的综合性知识,站长很热心。
Share This
Jul
18
2007
最近朋友的网站由于用户量上升及其他原因,使得mysql数据库性能出现严重问题,导致用户无法正常登录及使用。
为了找出性能问题的根结,Google了很多,最后从以下方面入手:
1. 配置mysql log_slow_queries 功能
输出哪些耗时的sql语句到日志中,使用mysqldumpslow去统计,从而确定是哪些应用的数据库查询影响了数据库性能。
log_slow_queries在my.cnf的配置,示例如下:
log_slow_queries
long_query_time = 2
log_long_format
Continue Reading »
Share This