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:
- From the terminal, I run mysqld in D:\xampp\mysql\bin. Then start mysql using XAMPP control panel. It works well.
- 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.