Link to home
Start Free TrialLog in
Avatar of Jason Livengood
Jason LivengoodFlag for United States of America

asked on

MySQL Physical Shrink?

Our webhost company has told us we are over their 100MB limit in terms of the diskspace they will allocate to our MySQL db. i am a newbie with MySQL.

Is there a way you can try to physically shrink a MySQL database. Much like in Access and SQL Server. If so, can anybody point me in ther right direction in doing so. Thanks.

jason
SOLUTION
Avatar of MarioAlcaide
MarioAlcaide

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Steve Tempest
Steve Tempest
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
InnoDB solutions provided above will require that you have full control over the server, you know which databases using InnoDB tables otherwise deleting ibdata1 file may result in data loss of some InnoDB tables you are not aware of.

OPTIMIZE TABLE will only shrink table size if you had deleted some data from them. Beware using OPTIMIZE TABLE on InnoDB tables, it may reset the AUTO_INCREMENT counter due to a bug which is fixed in latest release.
InnoDB solutions provided above will require that you have full control over the server, you know which databases using InnoDB tables otherwise deleting ibdata1 file may result in data loss of some InnoDB tables you are not aware of.

OPTIMIZE TABLE will only shrink table size if you had deleted some data from them. Beware using OPTIMIZE TABLE on InnoDB tables, it may reset the AUTO_INCREMENT counter due to a bug which is fixed in latest release.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial