Move IBDATA

I am trying to move the ibdata files to a new drive on my server (Red Hat), but am running into some issues. Here are the steps that I took:

1. Stop the MySQL Service
2. Edit the my.cnf file by adding the following lines:


innodb_log_group_home_dir=/db/idbdata
innodb_data_file_path=ibdata1:10M:autoextend
innodb_log_files_in_group=2
innodb_data_home_dir=/db/idbdata

3. Copy the ibdata1 file and the two ib_logfiles from /var/lib/mysql to /db/ibdata
4. Start the MySQL service backup

When I query any of the tables, specifically innodb tables I get the following error:

ERROR 1033 (HY000) on InnoDB configuration error
plecostomusAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tsmgeekConnect With a Mentor Commented:
Settings regarding the data files have to be the same when moving INNODB from server to server.
Very annoying it does not flag errors.
0
 
tsmgeekCommented:
look at the .err log file in /var/lib/mysql/ as that will give a more detailed error
0
 
plecostomusAuthor Commented:
The error message says the same thing. What is weird, is I changed the size of the inndob file the my.cnf file from 50M to the current size of the file on disk and it worked.
0
All Courses

From novice to tech pro — start learning today.