Oracle 5.0 Reference Manual page 1248

Table of Contents

Advertisement

The full syntax for a data file specification includes the file name, its size, and several optional
attributes:
file_name:file_size[:autoextend[:max:max_file_size]]
The
and
autoextend
innodb_data_file_path
If you specify the
autoextend
of free space in the tablespace. The increment is 8MB at a time by default. To modify the increment,
change the
innodb_autoextend_increment
If the disk becomes full, you might want to add another data file on another disk. For tablespace
reconfiguration instructions, see
Files".
is not aware of the file system maximum file size, so be cautious on file systems where the
InnoDB
maximum file size is a small value such as 2GB. To specify a maximum size for an auto-extending
data file, use the
attribute following the
max
to grow up to a limit of 500MB:
ibdata1
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend:max:500M
creates tablespace files in the MySQL data directory by default. To specify a location explicitly,
InnoDB
use the
innodb_data_home_dir
but create them in the
ibdata2
[mysqld]
innodb_data_home_dir = /ibdata
innodb_data_file_path=ibdata1:50M;ibdata2:50M:autoextend
Note
InnoDB
exists before you start the server. This is also true of any log file directories that
you configure. Use the Unix or DOS
directories.
Make sure that the MySQL server has the proper access rights to create files
in the data directory. More generally, the server must have access rights in any
directory where it needs to create data files or log files.
forms the directory path for each data file by textually concatenating the value of
InnoDB
innodb_data_home_dir
backslash) between values if necessary. If the
mentioned in
at all, the default value is the "dot" directory ./, which means the MySQL data
my.cnf
directory. (The MySQL server changes its current working directory to its data directory when it begins
executing.)
If you specify
innodb_data_home_dir
for the data files listed in the
equivalent to the preceding one:
[mysqld]
innodb_data_home_dir =
innodb_data_file_path=/ibdata/ibdata1:50M;/ibdata/ibdata2:50M:autoextend
A simple
example. Suppose that you have a computer with 512MB RAM and one hard disk.
my.cnf
The following example shows possible configuration parameters in
including the
autoextend
do not want to distribute
data file
and two
ibdata1
directory.
Configuration
InnoDB
attributes can be used only for the last data file in the
max
[1240]
line.
option for the last data file,
Section 14.2.4, "Adding, Removing, or Resizing
autoextend
[1240]
option. For example, to use two files named
directory, configure
/ibdata
does not create directories, so make sure that the
[1240]
to the data file name, adding a path name separator (slash or
[1240]
innodb_data_file_path
attribute. The example suits most users, both on Unix and Windows, who
data files and log files onto several disks. It creates an auto-extending
InnoDB
log files
InnoDB
ib_logfile0
1228
extends the data file if it runs out
InnoDB
[1237]
system variable.
attribute. The following configuration permits
InnoDB
command to create any necessary
mkdir
innodb_data_home_dir
as an empty string, you can specify absolute paths
[1240]
value. The following example is
my.cnf
and
ib_logfile1
Data and Log
InnoDB
ibdata1
like this:
directory
/ibdata
[1240]
option is not
or
for InnoDB,
my.ini
in the MySQL data
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents