1

我正在使用适用于 Windows 的 MariaDB。这很奇怪,在我用命令更改根密码之前一切正常

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
4

3 回答 3

0

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

于 2018-06-25T07:57:40.887 回答
0

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

于 2017-09-21T13:35:48.603 回答
-3

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

于 2017-09-21T13:47:26.190 回答