Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Recently I have moved the data folder of MySql to the other folder as describe in the my.ini following:

[mysqld]
port= 3306
socket= "D:/xampp/mysql/mysql.sock"
basedir="D:/xampp/mysql" 
tmpdir="D:/xampp/tmp" 
datadir="I:/Dropbox/mysql/data"
pid_file="mysql.pid"
skip-external-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log_error="mysql_error.log"
innodb_force_recovery = 4
innodb_use_sys_malloc = 1

However, I can't start mysql via XAMPP Control Panel. The following are the contents of two files: Elvis.err and mysql_error.log.

120819 20:12:28 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
120819 20:12:28  InnoDB: Initializing buffer pool, size = 128.0M
120819 20:12:28  InnoDB: Completed initialization of buffer pool
120819 20:12:28  InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120819 20:12:28  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
120819 20:12:31  InnoDB: 1.1.4 started; log sequence number 7527526
120819 20:12:31 [Note] Event Scheduler: Loaded 0 events
120819 20:12:31 [Note] mysqld: ready for connections.
Version: '5.5.8'  socket: ''  port: 3306  MySQL Community Server (GPL)

The content of mysql_error.log

120819 20:12:24 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
120819 20:12:24  InnoDB: Initializing buffer pool, size = 16.0M
120819 20:12:24  InnoDB: Completed initialization of buffer pool
120819 20:12:24  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 G:\Dropbox\mysql\data\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

I need to treat two issues. These are:

  1. From the terminal, I run mysqld in D:\xampp\mysql\bin. Then start mysql using XAMPP control panel. It works well.
  2. In fact, I changed the data folder to I:/Dropbox/mysql/data but mysql has still informed an error to be not created in G: that moved before.

And my questions: How can I configure mysql can be moved the data folder to new folder?

I am appreciated for all helps.

Thanks.

share|improve this question

migrated from webapps.stackexchange.com Aug 20 '12 at 7:27

This question came from our site for power users of web applications.

1  
This is the wrong site for this question. Are you running this on your own server or a hosted server? –  ChrisF Aug 19 '12 at 19:09
    
I just run it on localhost. –  Nguyen Vu Ngoc Tung Aug 19 '12 at 20:08

1 Answer 1

Looking at this:

"InnoDB: Operating system error number 3 in a file operation."

Then:

redmachine ~ # perror 3
OS error code   3:  No such process

Permissions need to be as the old folder, and the directory structure as in the old data folder. It looks like you might also need to repair some tables there.

Have a look at this post on mysql lists: http://lists.mysql.com/mysql/100211

share|improve this answer

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.