{"id":352,"date":"2018-10-03T13:24:16","date_gmt":"2018-10-03T16:24:16","guid":{"rendered":"http:\/\/www.bfnetworks.com.br\/?p=352"},"modified":"2022-07-15T10:18:34","modified_gmt":"2022-07-15T13:18:34","slug":"comando-mysqlcheck-verificando-e-corrigindo-db-mysql","status":"publish","type":"post","link":"https:\/\/bfnetworks.com.br\/comando-mysqlcheck-verificando-e-corrigindo-db-mysql\/","title":{"rendered":"COMANDO MYSQLCHECK: VERIFICANDO E CORRIGINDO DB MYSQL"},"content":{"rendered":"
Com o comando mysqlcheck podemos verificar se um determinado banco ou tabela de um banco est\u00e1 integro, sem erros ou corrompido. Mostrarei algumas de suas op\u00e7\u00f5es das diversas que existem.<\/p>\n
zabbixdb.group_prototype OK\nzabbixdb.groups OK\nzabbixdb.history\nwarning : Table is marked as crashed\nwarning : 1 client is using or hasn't closed the table properly\nerror : record delete-link-chain corrupted\nerror : Corrupt<\/b>\nzabbixdb.history_log OK\nzabbixdb.history_text OK\nzabbixdb.history_uint\nwarning : Table is marked as crashed\nwarning : 1 client is using or hasn't closed the table properly\nerror : record delete-link-chain corrupted\nerror : Corrupt<\/b>\nzabbixdb.host_discovery OK\nzabbixdb.host_inventory OK\n<\/pre>\n\n
- \n
Corrigindo erros de um banco<\/h3>\n<\/li>\n<\/ul>\n
\nmysqlcheck -r nome_do_banco -u root -p<\/div> <\/div>
\nObtive o seguinte resultado, corrigindo assim os erros que tive no banco:<\/p>\nzabbixdb.group_prototype OK\nzabbixdb.groups OK\nzabbixdb.history\nwarning : Number of rows changed from 5764036 to 5763139\nstatus : OK<\/b>\nzabbixdb.history_log OK\nzabbixdb.history_text OK\nzabbixdb.history_uint\nwarning : Number of rows changed from 13583760 to 13633846\nstatus : OK<\/b>\nzabbixdb.host_discovery OK\nzabbixdb.host_inventory OK\n<\/pre>\nFONTES<\/h3>\n
MySQL: use o mysqlcheck para fazer manuten\u00e7\u00e3o das suas tabelas<\/a><\/p><\/blockquote>\n