If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > disabling autoextend of datafile

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-11, 03:50
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
disabling autoextend of datafile

Hi
I have used the following command for disabling autoextend of data file


set global innodb_data_file_path = 'ibdata1:400M'

But it is giving error saying
Variable 'innodb_data_file_path' is a read only variable

Is there any way I can disable the autoextend of a particular datafile.

I want to limit the size of the datafile.

Thanks
Reply With Quote
  #2 (permalink)  
Old 10-27-11, 05:17
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
This is not a dynamic property, which means it must be set when mysql server gets started. You need to add this into the my.cnf (or my.ini on windows) under the [mysqld] section:

[mysqld]
innodb_data_file_path=ibdata1:400M
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 10-27-11, 05:58
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
Do I have to change any other parameter along with innodb_data_file_path

because after doing
innodb_data_file_path = ibdata1:40M

and mysql doesn't restart.

I have changed innodb_data_file_path and stopped and started but start does work.
If I change innodb_data_file_path back to its previous value

innodb_data_file_path = ibdata1:400M:autoextend

It get started successfully
Reply With Quote
  #4 (permalink)  
Old 10-27-11, 10:05
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
What error did you get in your mysql log file? Not sure whether this is what the problem is but if your file is 400M and you attempt to limit the size to 40M then this could be a problem.

An associated parameter is innodb_data_home_dir:

The paths to individual data files and their sizes. The full directory path to each data file is formed by concatenating innodb_data_home_dir to each path specified here
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #5 (permalink)  
Old 10-27-11, 10:38
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
I saw the logs and figure out that the new size of ibdata1 should be the one which you should specify

innodb_data_file_path=ibdata1:776M (776 is the actual size of ibdata1 in $HOME/var)

not

innodb_data_file_path=ibdata1:40M
Reply With Quote
  #6 (permalink)  
Old 10-27-11, 10:39
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
Thanks a ton for the help.
you guys are doing a great job.
Reply With Quote
  #7 (permalink)  
Old 11-02-11, 07:59
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
facing issue in limit db size

Hi

I have limit the db size using

ibdata1:928M

but the db is getting full. Although the size of ibdata1 is not getting increased but time stamp is increasing.
Reply With Quote
  #8 (permalink)  
Old 11-02-11, 08:32
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
This is normal as the header of the file will include some internal structures which are updated regularly. You can always increase the configuration of ibdata1 to be larger or start removing unwanted tables which are placed in this file which should free up some space. Or put back the autoextend parameter to allow it to continue growing without any checks.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On