简体   繁体   中英

MariaDB on Windows 8 InnoDB error

I am a SQL Server guy and have only recently decided to venture into the world of MySQL and have run into an issue that is preventing me from progressing :(

I have installed MariaDB and started testing the installation by running

mysqld.exe --console

and received the following error

[ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode

I have done quite a bit of research on this and have not found a solution that works.

I have tried the following:

Checked the user permissions for the containing folder of ibdata1 which is located at C:\\Program Files\\MariaDB 10.1\\data and everything looks correct.

I have tried deleting the ibdata1 and log files from the above location, stopping mysql and restarting.

I have tried repairing the application.

I have tried uninstalling and reinstalling.

None of these have worked.

Please let me know if you have any information that might help me.

This is on Windows 8, MariaDB version 10.1.13.

Thanks!

You're running MariaDB from the console interactively, which means you're running it under your local user account security context. I'm guessing the command-prompt window was not elevated first, so your security level will not grant you access to write to anything under %programfiles% .

There are two options:

  1. Change your MariaDB configuration to store the file under %ALLUSERSPROFILE% (which is C:\\ProgramData on Windows 8) or your local user account.
  2. Run MariaDB as a background service with its own user-account (a service-identity, perhaps, if you're comfortable with that, otherwise a normal user account) with appropriate permissions.

Out of curiosity, why are you running Windows 8 instead of Windows 8.1?

MariaDB MSI installs datadirectory under C:\\Program Files\\MariaDB ...\\data (not that different from SQLServer , where data directory is also under the installation root). During the installation you were asked if you want to install as service. Say "yes" to this, and then you won't need to start mysqld on the console window, it is already there, running as service.

Perhaps this service is already running , and thus second attempt to open the files (when you run mysqld --console) does not succeed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM