MySQL磁盘满repair多个表问题的解决
问题1: mysql 磁盘满问题2: mysql repair 多个表repair table: 需要按周以下步骤1: lock table EE write ;2: flush table EE
问题1: MySQL 磁盘满
问题2: mysql repair 多个表
repair table: 需要按周以下步骤
1: lock table EE write ;
2: flush table EE ;
3: repair table EE ;
4: flush table EE ;
5: unlock table EE ;
// 在使用mysql过程中发现了一个奇怪的问题:
我的磁盘空间快要满了(%90),df du 看了一下, 是mysql 占用了大量的空间,于是我把mysql中每个表中的数据删除了一半,但是硬盘空间仍然被占用%90 。
我但是没有管, 但是过了半个月,磁盘仍然没有满,,按理说很快就会超过%90 报警的 。
于是我想找出原因:
办法一: 怀疑是有进程在想里面些数据, 不能delete 。
./mysqladmin shutdown
./mysqld-safe
重启mysql , 没有任何效果
办法二: flush 每个表, 也不行
办法三: repair 其中一个表, 看来以下, 原来700M 的空间编程了200M左右。
但是问题又来了, 我有256个表, 我写了C++程序, 顺序repair 每一个表,但是会产生Commands out of sync; you can't run this command now 错误, 不能同步
后来, 我随便试了以下, repair table1 , table2, table3 ; 这样是可以的。
原来 repair 可以一次可以repair 多个表, 问题解决了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.
