Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cb090944
Commit
cb090944
authored
Jan 22, 2002
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manual.texi:
Add nore info to make InnoDB installation easier
parent
66400f03
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
10 deletions
+78
-10
Docs/manual.texi
Docs/manual.texi
+78
-10
No files found.
Docs/manual.texi
View file @
cb090944
...
@@ -37055,10 +37055,6 @@ data file @file{ibdata1} to the @code{datadir} of MySQL.
...
@@ -37055,10 +37055,6 @@ data file @file{ibdata1} to the @code{datadir} of MySQL.
But to get good performance you MUST explicitly set the InnoDB parameters
But to get good performance you MUST explicitly set the InnoDB parameters
listed below in examples.
listed below in examples.
The default value for @code{innodb_data_home_dir} is the @code{datadir}
of MySQL. If you do not specify @code{innodb_data_home_dir}, then
you cannot use absolute paths in @code{innodb_data_file_path}.
Suppose you have a Windows NT machine with 128 MB RAM and a single 10 GB
Suppose you have a Windows NT machine with 128 MB RAM and a single 10 GB
hard disk. Below is an example of possible configuration parameters in
hard disk. Below is an example of possible configuration parameters in
@file{my.cnf} for InnoDB:
@file{my.cnf} for InnoDB:
...
@@ -37094,15 +37090,19 @@ set-variable = innodb_file_io_threads=4
...
@@ -37094,15 +37090,19 @@ set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50
set-variable = innodb_lock_wait_timeout=50
@end example
@end example
Note that @strong{InnoDB does not create directories:
you have to create them yourself.}
Check also that the MySQL server
has the @strong{rights to create files in the directories} you specify.
Note that data files must be < 2G in
Note that data files must be < 2G in
some file systems! The total size of data files has
some file systems! The total size of data files has
to be >= 10 MB. The combined size of log files MUST be < 4G
to be >= 10 MB. The combined size of log files MUST be < 4G
in 32-bit computers.
in 32-bit computers.
@strong{InnoDB does not create directories:
The default value for @code{innodb_data_home_dir} is the @code{datadir}
you have to create them yourself.}
of MySQL. If you do not specify @code{innodb_data_home_dir}, then
Check also that the MySQL server
you cannot use absolute paths in @code{innodb_data_file_path}.
has the rights to create files in the directories you specify.
When you the first time create an InnoDB database, it
When you the first time create an InnoDB database, it
is best that you start the MySQL server from the command
is best that you start the MySQL server from the command
...
@@ -37115,6 +37115,43 @@ For example, in Windows you can start @file{mysqld-max.exe} with:
...
@@ -37115,6 +37115,43 @@ For example, in Windows you can start @file{mysqld-max.exe} with:
your-path-to-mysqld>mysqld-max --standalone --console
your-path-to-mysqld>mysqld-max --standalone --console
@end example
@end example
@strong{Where to put my.cnf or my.ini in Windows?}
The rules for Windows are the following:
@itemize @bullet
@item Only one of @file{my.cnf} or @file{my.ini} should be created.
@item The @file{my.cnf} file should be placed in the root
directory of the drive @file{C:}.
@item The @file{my.ini} file should be placed in the WINDIR directory, e.g,
@file{C:\WINDOWS} or @file{C:\WINNT}. You can use the @code{SET}
command of MS-DOS to print the value of WINDIR.
@item If your PC uses a boot loader where the @file{C:} drive
is not the boot drive, then your only option is to use the @file{my.ini} file.
@end itemize
@strong{Where to specify options in Unix?}
On Unix @file{mysqld} reads options from the following files, if they exist,
in the following order:
@itemize @bullet
@item @file{/etc/my.cnf} Global options.
@item @file{COMPILATION_DATADIR/my.cnf} Server-specific options.
@item @file{defaults-extra-file} The file specified with
@code{--defaults-extra-file=...}.
@item @file{~/.my.cnf} User-specific options.
@end itemize
@code{COMPILATION_DATADIR} is the MySQL data directory which was
specified as a @code{./configure} option when @file{mysqld}
was compiled
(typically @file{/usr/local/mysql/data} for a
binary installation or @file{/usr/local/var}
for a source installation).
If you are not sure from where @file{mysqld} reads its @file{my.cnf}
or @file{my.ini}, you can give the path as a command-line option:
@code{--defaults-file=your_path_to_my_cnf}.
Suppose you have a Linux computer with 512 MB RAM and
Suppose you have a Linux computer with 512 MB RAM and
three 20 GB hard disks (at directory paths @file{/},
three 20 GB hard disks (at directory paths @file{/},
@file{/dr2} and @file{/dr3}).
@file{/dr2} and @file{/dr3}).
...
@@ -37131,7 +37168,9 @@ innodb_data_home_dir = /
...
@@ -37131,7 +37168,9 @@ innodb_data_home_dir = /
# hold your data and indexes
# hold your data and indexes
innodb_data_file_path = ibdata/ibdata1:2000M;dr2/ibdata/ibdata2:2000M
innodb_data_file_path = ibdata/ibdata1:2000M;dr2/ibdata/ibdata2:2000M
# Set buffer pool size to 50 - 80 %
# Set buffer pool size to 50 - 80 %
# of your computer's memory
# of your computer's memory, but
# make sure on Linux x86 the total
# memory usage is < 2 GB
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_additional_mem_pool_size=20M
set-variable = innodb_additional_mem_pool_size=20M
innodb_log_group_home_dir = /dr3/iblogs
innodb_log_group_home_dir = /dr3/iblogs
...
@@ -37166,6 +37205,19 @@ improve the performance of the database if all data is not placed
...
@@ -37166,6 +37205,19 @@ improve the performance of the database if all data is not placed
on the same physical disk. Putting log files on a different disk from
on the same physical disk. Putting log files on a different disk from
data is very often beneficial for performance.
data is very often beneficial for performance.
@strong{Warning:} on Linux x86 you must be careful you
@strong{do not set memory usage
too high}. glibc will allow the process heap to grow over thread stacks,
which will crash your server. Make sure
@example
innodb_buffer_pool_size + key_buffer +
max_connections * (sort_buffer + record_buffer) + max_connections * 1 MB
@end example
is significantly smaller than 2 GB. Each thread will use a stack
(often 1 MB) and in the worst case also
@code{sort_buffer + record_buff}
additional memory.
The meanings of the configuration parameters are the following:
The meanings of the configuration parameters are the following:
@multitable @columnfractions .30 .70
@multitable @columnfractions .30 .70
...
@@ -37322,6 +37374,22 @@ mysqld: ready for connections
...
@@ -37322,6 +37374,22 @@ mysqld: ready for connections
@node Error creating InnoDB, , InnoDB init, InnoDB init
@node Error creating InnoDB, , InnoDB init, InnoDB init
@subsubsection If Something Goes Wrong in Database Creation
@subsubsection If Something Goes Wrong in Database Creation
If InnoDB prints an operating system error in a file operation,
usually the problem is one of the following:
@itemize @bullet
@item You did not create InnoDB data or log directories.
@item @file{mysqld} does not have the rights to create files in those
directories.
@item @file{mysqld} does not read the right @file{my.cnf} or @file{my.ini}
file, and consequently does not see the options you specified.
@item The disk is full or a disk quota is exceeded.
@item You have created a subdirectory whose name is equal to a data file
you specified.
@item There is a syntax error in @code{innodb_data_home_dir}
or @code{innodb_data_file_path}.
@end itemize
If something goes wrong in an InnoDB database creation, you should
If something goes wrong in an InnoDB database creation, you should
delete all files created by InnoDB. This means all data files, all log
delete all files created by InnoDB. This means all data files, all log
files, the small archived log file, and in the case you already did
files, the small archived log file, and in the case you already did
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment