Adding a file in innodb
From Wikitech
(Difference between revisions)
ArielGlenn (Talk | contribs) |
|||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
add the second file like this : | add the second file like this : | ||
| − | innodb_data_file_path = / | + | innodb_data_file_path = /mnt/raid1/ibdata2:60000M;/usr/local/mysql/data/ibdata1:20000M:autoextend |
Nota : the autoextend file must be the last on the line | Nota : the autoextend file must be the last on the line | ||
| Line 13: | Line 13: | ||
It could take some time, time to rebuild the innodb space. You can follow the process in .err file | It could take some time, time to rebuild the innodb space. You can follow the process in .err file | ||
| + | |||
| + | And... it doesnt work | ||
| + | |||
| + | autoextend must be the last file, but a new file must be add in last.... | ||
| + | |||
| + | Plan B : | ||
| + | |||
| + | *stop mysql | ||
| + | *note the size of ibdata1, the autoextend file | ||
| + | *convert in MB (size /1024 /1024) | ||
| + | *put innodb_data_file_path = /usr/local/mysql/data/ibdata1:87544M;/mnt/raid1/ibdata2:60000M;/usr/local/mysql/data/ibdata3:50M:autoextend | ||
| + | *restart mysql | ||
| + | |||
| + | [[Category:How-To]] | ||
| + | [[Category:MySQL]] | ||
Latest revision as of 19:21, 29 October 2010
edit /etc/my.cnf
at line innodb_data_file_path = /usr/local/mysql/data/ibdata1:20000M:autoextend
add the second file like this :
innodb_data_file_path = /mnt/raid1/ibdata2:60000M;/usr/local/mysql/data/ibdata1:20000M:autoextend
Nota : the autoextend file must be the last on the line
- stop mysql : mysqladmin -u root -p shutdown
- start mysql : mysqld_safe
It could take some time, time to rebuild the innodb space. You can follow the process in .err file
And... it doesnt work
autoextend must be the last file, but a new file must be add in last....
Plan B :
- stop mysql
- note the size of ibdata1, the autoextend file
- convert in MB (size /1024 /1024)
- put innodb_data_file_path = /usr/local/mysql/data/ibdata1:87544M;/mnt/raid1/ibdata2:60000M;/usr/local/mysql/data/ibdata3:50M:autoextend
- restart mysql