MySQL Forums
Forum List  »  InnoDB

Resizing innoDB datafile
Posted by: Dhananjay raju
Date: January 13, 2009 12:56AM

Hi, i am using mysql with innoDB storage engine.Currently the datafile(ibdata1) file size is around 130G.To reduce the data file size on the disk,i have purged / removed unwanted records from the tables.Earlier the record count of some tables were 30 million each,now the count has come down to around < 6 lakh.

I have recreated the DB(mysqldump,drop DB,restore DB).But still the data file size is 130G.Later i thought to remove the ibdata1 and the log files from '/var/lib/mysql' directory before restoring the DB.Here i have few queries

1.If i delete / remove the datafile,can i login to mysql console using valid username and password to restore the dropped DB ? Since all the data related to mysql DB(which contains the mysql users login / password) will also be deleted when u remove the data file.

2.after dropping the DB,change the 'innodb_data_file_path' to 'ibdata/ibdata1:10M:autoextend'.So that a new data file will be created for the future operations.Can i remove the old ibdata1 data file(130G) now ?

Please share yours ideas

Thanks
Raju

Options: ReplyQuote


Subject
Views
Written By
Posted
Resizing innoDB datafile
6256
January 13, 2009 12:56AM
3031
January 13, 2009 09:05PM
2862
January 14, 2009 03:36AM
2382
January 15, 2009 01:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.