Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a MySQL instance installed on Windows 7 and I wanted to change the directory of InnoDB tables data. I modified the "my.ini" adding the following line after "[mysqld]":

innodb_data_home_dir="/ibdata"

After that, I wasn't able to restart the MySQL. Looking at the log, it had the following entries:

130124 12:00:52 [Note] Plugin 'FEDERATED' is disabled.
130124 12:00:52 InnoDB: The InnoDB memory heap is disabled
130124 12:00:52 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130124 12:00:52 InnoDB: Compressed tables use zlib 1.2.3
130124 12:00:52 InnoDB: Initializing buffer pool, size = 106.0M
130124 12:00:52 InnoDB: Completed initialization of buffer pool
130124 12:00:52  InnoDB: Operating system error number 3 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: File name \ibdata\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

I made sure I had created the directory "ibdata" under the MySQL data directory beforehand. I've tried moving existing files I think are associated to InnoDB to the new directory (from the clue given by the log file) but the problem persisted.

Why mysql cannot start working with the new directory?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You mention that you are running on Windows. The path to Windows directories are not the same as UNIX ( you cannot just use /ibdata). Instead try setting it like:

innodb_data_home_dir="C:\path\to\ibdata"
share|improve this answer
    
Thank you! I had made some confusion. First I tried setting an absolute directory, as you said, but forgot to create it. Then I decided to change the name of it to match the example in the MySQL documentation page, changed the setting to what thought to be a relative path and created the folder, this time. –  Arthur Nunes Jan 24 '13 at 14:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.