linux修复mysql_linux – MySQL表没有修复

表信息:

Database name: user_motiva

Table name: wp_options.frm wp_options.MYD wp_options.MYI wp_options.TMD

当我做一个mysqlcheck -r –all-databases时,即使你让它整天坐着,它也会挂在那个桌子上.即使只是一张支票挂在同一个地方.

有没有其他方法来修复/修复/恢复该表?

我应该使用myisamchk吗?我看到类似的东西:

shell> myisamchk --recover City

您甚至无法从phpMyAdmin访问/查看数据库,甚至“USE”;在mysql没有它只是挂.

我配置在一个16GB的ram盒子上

cat /etc/my.cnf

[mysqld]

default-storage-engine=MyISAM

local-infile=0

symbolic-links=0

skip-networking

max_connections = 500

max_user_connections = 20

key_buffer = 512M

myisam_sort_buffer_size = 64M

join_buffer_size = 64M

read_buffer_size = 12M

sort_buffer_size = 12M

read_rnd_buffer_size = 12M

table_cache = 2048

thread_cache_size = 16K

wait_timeout = 30

connect_timeout = 15

tmp_table_size = 64M

max_heap_table_size = 64M

max_allowed_packet = 64M

max_connect_errors = 10

query_cache_limit = 1M

query_cache_size = 64M

query_cache_type = 1

low_priority_updates=1

concurrent_insert=ALWAYS

log-error=/var/log/mysql/error.log

tmpdir=/home/mysqltmp

myisam_repair_threads=4

[mysqld_safe]

open_files_limit = 8192

log-error=/var/log/mysql/error.log

[mysqldump]

quick

max_allowed_packet = 512M

[myisamchk]

key_buffer = 64M

sort_buffer = 64M

read_buffer = 16M

write_buffer = 16M

这是因为killall -9 mysqld崩溃了,因为它不会关闭并重启?

编辑:

root@server [/var/lib/mysql/user_motiva]# myisamchk -e *.MYI

Checking MyISAM file: wp_options.MYI

Data records: 1827 Deleted blocks: 3

myisamchk: warning: 3 clients are using or haven't closed the table properly

- check file-size

- check record delete-chain

- check key delete-chain

- check index reference

- check data record references index: 1

- check data record references index: 2

- check records and index references

MyISAM-table 'wp_options.MYI' is usable but should be fixed

root@server [/var/lib/mysql/user_motiva]# myisamchk --safe-recover wp_options.MYI

- recovering (with keycache) MyISAM-table 'wp_options.MYI'

Data records: 1827

myisamchk: error: Can't create new tempfile: 'wp_options.TMD'

MyISAM-table 'wp_options.MYI' is not fixed because of errors

Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag

root@ns2 [/var/lib/mysql/user_motiva]# myisamchk -o -f wp_options.MYI

- recovering (with keycache) MyISAM-table 'wp_options.MYI'

Data records: 1827

这是否意味着它现在已修复?如果是这样,我该如何将其移回? (这是在不同的服务器上完成的)

有没有办法让MySQL在主服务器上运行并运行命令来修复所有文件?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值