Недавно я переместил папку данных MySql в другую папку, как описано в my.ini следующий:
[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
Однако я не могу запустить mysql через панель управления XAMPP. Ниже приводится содержимое двух файлов: Elvis.err и 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)
Содержание 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.
Мне нужно решить две проблемы. Эти:
И мои вопросы: как я могу настроить mysql, можно ли переместить папку данных в новую папку?
Я благодарен за любую помощь.
Спасибо.
Глядя на это:
«InnoDB: ошибка операционной системы номер 3 в файловой операции».
Затем:
redmachine ~ # perror 3
OS error code 3: No such process
Разрешения должны быть как в старой папке, так и в структуре каталогов как в старой папке данных. Похоже, вам также может понадобиться отремонтировать там некоторые таблицы.
Взгляните на этот пост в списках mysql: http://lists.mysql.com/mysql/100211