报错记录

vps运行了一段时间后,趁我晚上睡觉时居然出问题了,几百个站的支付都经过这个vps...惊恐

程序报错:[error] => Got error 28 from storage engine



查看/var/log/mysqld.log这个文件

Number of processes running now: 0
111209 19:33:22  mysqld restarted
111209 19:33:22 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
111209 19:33:22 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my
Number of processes running now: 0
111209 19:33:22  mysqld restarted
111209 19:33:22 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
111209 19:33:22 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
111209 19:33:22 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
111209 19:33:22 [ERROR] Can't start server: can't create PID file: No space left on device

备份ib_logfile1,ib_logfile0后删除掉

重启mysql

还是报Timeout error occurred trying to start MySQL Daemon

df -h,居然使用100%,删除日志文件等等,查看还是100%,

执行/usr/bin/mysql_install_db

Installing MySQL system tables...
111209 19:45:48 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
111209 19:45:48 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
111209 19:45:48 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
111209 19:45:48 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK


日志满了

稀里糊涂的,还没搞醒合。

解决了,数据文件保留在,不过数据库用户密码要重新设置。



网上看到一个办法:


解决方法: 以RPM 包安装版本

执行文件路径: /USR/BIN/MYSQL  (以MY 开头的 所有执行文件)

安装目录是: /usr/share/mysql

数据库存储路径: /usr/lib/mysql

首先查看 硬盘空间 是否已满

[root@hot~]# df   (查看硬盘 空间使用情况)

修复日志数据

myisamchk -f /var/lib/mysql/system_db/*.MYI

mysql 服务可以启动了

修复表

先登录 MYSQL

1、/USR/BIN/MYSQL -U ROOT -P

2、showdatabases;

3、repiar table 加表名称

 更改 MAX_JOIN_SIZE

mysql> select @@max_join_size;
+-----------------+
| @@max_join_size |
+-----------------+
| 705032704 |
+-----------------+
1 row in set (0.00 sec)

mysql> SET sql_max_join_size=4294967295;
Query OK, 0 rows affected (0.00 sec)

你可能感兴趣的:(JOIN,mysql,数据库,File,System,Path)