InnoDB errors MySQL windows 8 - mysql

I just upgraded from Windows 7 to Windows 8, however a lot of settings or files have changed and I can no longer connect to a MySQL database.
Here is the error I get:
130124 23:56:02 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Randy-PC.lower-test
130124 23:56:02 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Randy-PC.lower-test
130124 23:56:02 [Note] Plugin 'FEDERATED' is disabled.
130124 23:56:03 InnoDB: The InnoDB memory heap is disabled
130124 23:56:03 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130124 23:56:03 InnoDB: Compressed tables use zlib 1.2.3
130124 23:56:03 InnoDB: Initializing buffer pool, size = 128.0M
130124 23:56:03 InnoDB: Completed initialization of buffer pool
130124 23:56:03 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
What can I do to get my database up and running again?
All help is greatly appreciated!

The most likely explanation is that the permissions on the MySQL data directory were modified by the Windows 8 upgrade.
From the error message, it looks like your InnoDB data directory may be C:\Program Files\MySQL\MySQL Server 5.5\data
Use Windows Explorer to navigate to that directory, right click, and open the Properties, and click on the Security tab. The service account that the MySQL services is running under needs to have Full access (all privileges) to that directory. When you click on Edit, there's two columns of check boxes for Allow and Deny... Full Control, Modify, Read & execute, etc.)
(NOTE: I'm not running Windows 8. On my Windows 7 system, the data directory is C:\ProgramData\MySQL\MySQL Server 5.5\data\)

Related

Moving MySQL data to another drive

I want to move my data in C:\ProgramData\MySQL\MySQL Server 5.5\data to E:\Mysql5Data
Stopped MySQL5 Service
Changed "datadir" value in my.ini file to E:/Mysql5Data
Started MySQL5 Service
I got 1067 Process terminated unexpectedly error while starting MySQL.
Update:
Logs
160509 13:18:56 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\DGNLWEBBIP01.lower-test
160509 13:18:56 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\DGNLWEBBIP01.lower-test
160509 13:18:56 [Note] Plugin 'FEDERATED' is disabled.
160509 13:18:56 InnoDB: The InnoDB memory heap is disabled
160509 13:18:56 InnoDB: Mutexes and rw_locks use Windows interlocked functions
160509 13:18:56 InnoDB: Compressed tables use zlib 1.2.3
160509 13:18:56 InnoDB: Initializing buffer pool, size = 128.0M
160509 13:18:56 InnoDB: Completed initialization of buffer pool
160509 13:18:56 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
SOLUTION:
Murray's comment

I can not start the MySQL Server from command line in windows

Whenever I write the command "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" the command prompt hits back with something like this:
C:\>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld"
141110 3:12:58 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Dutta.lower-test
141110 3:12:58 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Dutta.lower-test
141110 3:12:58 [Note] Plugin 'FEDERATED' is disabled.
141110 3:12:58 InnoDB: The InnoDB memory heap is disabled
141110 3:12:58 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141110 3:12:58 InnoDB: Compressed tables use zlib 1.2.3
141110 3:12:58 InnoDB: Initializing buffer pool, size = 128.0M
141110 3:12:58 InnoDB: Completed initialization of buffer pool
141110 3:12:58 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
I'm just a beginner. May be a silly mistake. Sorry in advance !!
I think I got it. I had the exact same problem and actually ended up uninstalling and reinstalling a couple of times; until...
start> CMD> c:\Program Files\MySQL Server 5.7\bin> mysql -u root -p
Hope its as simple for u too. I kinda laughed when I noticed.
The context and privileges of the current user will take affect when you manually start the executable in this way.
You either need to make sure:
The current user has the correct permissions to all files and directories required
You elevate permissions of the command prompt to run as an administrator
If you have the MySQL service installed you can also use net start MySQL.
This page of the MySQL manual contains useful information for installing and running the MySQL server on windows.
Please remember that once you have 'started' the MySQL service (or service) you won't actually see anything, you will then need to use a MySQL client application to connect to the server and interact.
I'm posting this answer in case it solves it for some people.
All I had to do was to:
Open task manager
Open Services tab
Find MySQL80 service and start it.
then just start the MySQL workbench and refresh the schemas.

Why is my MySQL database crashing on Windows IIS 6 with VMWARE error 1784

This is the errormessage from the MySQL error-log
130323 1:13:49 InnoDB: Operating system error number 1784 in a file operation.
InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/ refman/5.5/en/operating-system-error-codes.html
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'Windows aio'.
InnoDB: Cannot continue operation.
130323 1:14:51 [Note] Plugin 'FEDERATED' is disabled.
130323 1:14:51 InnoDB: The InnoDB memory heap is disabled
130323 1:14:51 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130323 1:14:51 InnoDB: Compressed tables use zlib 1.2.3
130323 1:14:51 InnoDB: Initializing buffer pool, size = 339.0M
130323 1:14:51 InnoDB: Completed initialization of buffer pool
130323 1:14:51 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 6667918676
130323 1:14:51 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
(...)
If you have a MySQL-server in a hosted area (virtualisation), there is a Sync Driver (process: LGTO Sync) that quiescies the hard drive before VMWare takes a snapshot. This process stops all I/O requests to the drive and makes MySQL crash with the error code mentioned. Solution: disable the sync driver on database servers.
To disable the SYNC driver:
- In the Windows Device Manager, click View > Show hidden devices.
- Expand Non-Plug and Play Drivers.
- Right-click Sync Driver and click Disable.
- Click Yes twice to disable the device and restart the computer.
Check also 'don't load on restart', otherwise you have the same problem again at a reboot...

MySQL InnoDB database restore using .frm files and ibdata files

Hi mistakenly I have deleted my MySQL database from Windos XP based PC (this database was used to host a Wiki service using Xampp package). Now I am trying to restore the data so that I can atleast retrieve the TEXT entered in the respective table of Mediawiki package.
After deletion I tried to recover the data using Minitool data recovery software and was able to recover the main schema folder containing .frm files, ib_logfile0, ib_logfile1 and ibdata1 (which was stored under C>xampp>mysql>data).
Now I am trying to restore the database so that I can take a SQL dump and use it accordingly. I have consulted some previous suggestions provided by the experts. Below are the links -
Restoring MySQL InnoDB files on Windows
Stackoverflow answers
But these did not help me very much, not sure what exactly I am missing from the instructions. At the end I was unable to start MySQL service and it failed with the below errors in log -
120823 12:17:04 [Note] Plugin 'FEDERATED' is disabled.
120823 12:17:04 InnoDB: The InnoDB memory heap is disabled
120823 12:17:04 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120823 12:17:04 InnoDB: Compressed tables use zlib 1.2.3
120823 12:17:04 InnoDB: Initializing buffer pool, size = 16.0M
120823 12:17:04 InnoDB: Completed initialization of buffer pool
120823 12:17:04 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
120823 12:17:04 [ERROR] Plugin 'InnoDB' init function returned error.
120823 12:17:04 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120823 12:17:04 [ERROR] Unknown/unsupported storage engine: InnoDB
120823 12:17:04 [ERROR] Aborting
Any help to recover from this situation will be highly appreciated. I am willing to provide some more data if required. [MySQL Server Version 5.5, xampp-win32-1.8.0-VC9]
Oh God finally it's solved :)
Actually I am a novice that's why I could not solve this quickly. Here is the workflow I followed.
I installed a fresh copy of MySQL server. Run Wizard config for transactional database.
I stopped MySQL from Services.msc
Then overwrote the ib* and *frm files (under the schema folder) in C/programdata/mysql/mysql server 5.5/data folder
Updated the my.ini in C/apps/mysql with the innodb_log_file_size=<actual size of iblogfile0>
ran the command mysqld --defaults-file="C:/apps/mysql/my.ini" --standalone --console --innodb_force_recovery=6
once the above completed closed cmd.exe
restarted MySQL service
Opened MySQL workbench and took a dump
Sorry to confuse you all. Thanks again. Let me know if anybody requires any clarity for the above steps.

Changing the data folder of MySQL database

I tried to change the data folder path of MySQL by changing the datadir parameter in the my.ini file. But when I restarted MySQL service again I get the following error :
Error 1067: the process terminated unexpectedly.
I checked the .err file, the following errors are present: (they are all about InnoDB)
120319 3:59:59 [Note] Plugin 'FEDERATED' is disabled.
120319 3:59:59 InnoDB: The InnoDB memory heap is disabled
120319 3:59:59 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120319 3:59:59 InnoDB: Compressed tables use zlib 1.2.3
120319 3:59:59 InnoDB: Initializing buffer pool, size = 75.0M
120319 3:59:59 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 99614720 bytes
InnoDB: than specified in the .cnf file 0 39845888 bytes!
120319 3:59:59 [ERROR] Plugin 'InnoDB' init function returned error.
120319 3:59:59 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120319 3:59:59 [ERROR] Unknown/unsupported storage engine: INNODB
120319 3:59:59 [ERROR] Aborting
You have to specify the right size for:
innodb_log_file_size=95M in your my.cnf or my.ini. It is specified as 38M currently I guess.
Also check from your data folder as how many ib_logfiles you have. If you have more than 2, specify also: innodb_log_files_in_group=2.
Is this on Windows? If so one could use a VHD as storage device for MariaDB/MySQL. I've done so to prevent loss of data whenever I install or update the DB software (in Wamp, Xampp, Mamp, Wampserver etc.)
In order to do so I created a VHD with diskpart and mount it in boot time to the data folder in the respective MariaDB or MySQL folder (moving the original to data.orig first and copying it back as soon the device is running)
I use this script to mount the vhd at boot:
diskpart /s "C:\ProgramData\DB\connectvdisk\attach_mariadb-data.diskpart"
where attach_mariadb-data.diskpart contains
select vdisk file="c:\ProgramData\DB\mariadb-daten.vhdx"
attach vdisk
and the vhdx was set to mount to the proper location in Disk Manager.
The script is executed at boot time (trigger: At Startup) with Task Scheduler running cmd.exe with the following as parameter
/c "C:\ProgramData\DB\connectvdisk\connect-vhd.cmd"
I hijacked the ProgramData folder for this kind of storage. On some systems I've moved the scripts and device to secondary storage (D:) to be sure it survives a OS reinstall.
This continues to work on Windows 11