MariaDB ibdata1文件无法写入

时间:2017-09-21 13:24:00

标签: mysql mariadb mariasql

我正在使用MariaDB for windows。 它是stange,在我用命令

更改root密码之前一切正常
USER 'root'@'localhost' IDENTIFIED BY 'password';

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password');

(密码只是假的)

我无法通过以下命令启动数据库:

bin\mysqld.exe --defaults-file=my.ini --standalone --console

我已经尝试过将数据文件夹的chmod设置为777 ...

我现在收到以下错误:

C:\vayu_neu>mariadb\bin\mysqld.exe --defaults-file=mariadb\my.ini --standalone --console
2017-09-21 15:16:06 12652 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
2017-09-21 15:16:06 12652 [Note] mariadb\bin\mysqld.exe (mysqld 10.2.8-MariaDB-log) starting as process 13924 ...
2017-09-21 15:16:06 12652 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-09-21 15:16:06 12652 [Note] InnoDB: Uses event mutexes
2017-09-21 15:16:06 12652 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-09-21 15:16:06 12652 [Note] InnoDB: Number of pools: 1
2017-09-21 15:16:06 12652 [Note] InnoDB: Using generic crc32 instructions
2017-09-21 15:16:06 12652 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-09-21 15:16:06 12652 [Note] InnoDB: Completed initialization of buffer pool
2017-09-21 15:16:06 12652 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-09-21 15:16:06 12652 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-09-21 15:16:06 12652 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-09-21 15:16:06 12652 [Note] InnoDB: Starting shutdown...
2017-09-21 15:16:07 12652 [ERROR] Plugin 'InnoDB' init function returned error.
2017-09-21 15:16:07 12652 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-09-21 15:16:07 12652 [Note] Plugin 'FEEDBACK' is disabled.
2017-09-21 15:16:07 12652 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-09-21 15:16:07 12652 [ERROR] Aborting

3 个答案:

答案 0 :(得分:0)

您应该检查运行数据库配置文件(.ini)中innodb_data_home_dir指定的目录数据库的用户的权限,也许它是一个不同的目录

答案 1 :(得分:0)

如果更改了目录,则修改或禁用SELINUX服务。 这不允许在DATA目录更改后创建文件和启动MySQL。

答案 2 :(得分:-1)

删除文件ibdata1,ibdata2,ib_logfile0,ib_logfile1似乎解决了这个问题。我不知道为什么,但确实如此。