mysql : InnoDB: Cannot continue operation - mysql

I have installed mysql on windows 7 environment.
When I attempt to start the server from command line
as: mysqld --user=root
I get following message:
120914 15:47:04 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\SFO1502128830A.lower-test
120914 15:47:04 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\SFO1502128830A.lower-test
120914 15:47:04 [Note] Plugin 'FEDERATED' is disabled.
120914 15:47:04 InnoDB: The InnoDB memory heap is disabled
120914 15:47:04 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120914 15:47:04 InnoDB: Compressed tables use zlib 1.2.3
120914 15:47:04 InnoDB: Initializing buffer pool, size = 128.0M
120914 15:47:04 InnoDB: Completed initialization of buffer pool
120914 15:47:04 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.
Please advice,
Thanks,

Try this:
Run Windows CMD Prompt as an Administrator and execute your MySql command.

Related

mysql datadir from old hard drive system does not boot

I´m trying to migrate a mysql database from an old drive which had fedora9 (which did not boot anymore) to an ubuntu 16.04 server.
I copied the /var/lib/mysql folder from the old system to /testdb/mysql in the new system.
I change the owner to mysql:mysql to the new folder and update datadir of my.conf to this new folder, but the mysql server does not boot anymore. I get the following error:
170625 12:44:37 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
170625 12:44:37 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
170625 12:44:37 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170625 12:44:37 InnoDB: The InnoDB memory heap is disabled
170625 12:44:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170625 12:44:37 InnoDB: Compressed tables use zlib 1.2.8
170625 12:44:37 InnoDB: Using Linux native AIO
170625 12:44:37 InnoDB: Initializing buffer pool, size = 128.0M
170625 12:44:37 InnoDB: Completed initialization of buffer pool
170625 12:44:37 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
170625 12:44:38 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
170625 12:44:38 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
170625 12:44:38 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170625 12:44:38 InnoDB: The InnoDB memory heap is disabled
170625 12:44:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170625 12:44:38 InnoDB: Compressed tables use zlib 1.2.8
170625 12:44:38 InnoDB: Using Linux native AIO
170625 12:44:38 InnoDB: Initializing buffer pool, size = 128.0M
170625 12:44:38 InnoDB: Completed initialization of buffer pool
170625 12:44:38 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
170625 12:44:38 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
170625 12:44:38 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
170625 12:44:38 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170625 12:44:38 InnoDB: The InnoDB memory heap is disabled
170625 12:44:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170625 12:44:38 InnoDB: Compressed tables use zlib 1.2.8
170625 12:44:38 InnoDB: Using Linux native AIO
170625 12:44:38 InnoDB: Initializing buffer pool, size = 128.0M
170625 12:44:38 InnoDB: Completed initialization of buffer pool
170625 12:44:38 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
I tried to change all permissions, even 777 to all files (only to try it), but always have the same result.
How can I recover the databases?
I finally found the way to recover the tables, and it is not changing the datadir from my.conf (it didn´t work, even copying the content of the default database that works fine), I copied the folder I want to recover to the default datadir, overwriting all files except mysql.sock and mysql folder.
Then I started the mysql server and it works, but some tables shall to be repaired with
mysqlcheck --repair --all-databases -u root -p
Now everything works fine

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

Ubuntu MySQL: Job failed to start

My Google Cloud server HDD space run out. So I've added another mounted HDD where I copied contents of MySQL data (/var/lib/mysql/*). After updating my.cnf when I tried to restart MySQL it fails leaving the following error:
160110 14:10:40 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use$
160110 14:10:40 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
160110 14:10:40 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160110 14:10:40 InnoDB: The InnoDB memory heap is disabled
160110 14:10:40 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160110 14:10:40 InnoDB: Compressed tables use zlib 1.2.8
160110 14:10:40 InnoDB: Using Linux native AIO
160110 14:10:40 InnoDB: Initializing buffer pool, size = 128.0M
160110 14:10:40 InnoDB: Completed initialization of buffer pool
160110 14:10:40 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
160110 14:10:41 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use$
160110 14:10:41 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
160110 14:10:41 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160110 14:10:41 InnoDB: The InnoDB memory heap is disabled
160110 14:10:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160110 14:10:41 InnoDB: Compressed tables use zlib 1.2.8
160110 14:10:41 InnoDB: Using Linux native AIO
160110 14:10:41 InnoDB: Initializing buffer pool, size = 128.0M
160110 14:10:41 InnoDB: Completed initialization of buffer pool
160110 14:10:41 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
160110 14:10:42 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use$
160110 14:10:42 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
160110 14:10:42 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160110 14:10:42 InnoDB: The InnoDB memory heap is disabled
160110 14:10:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160110 14:10:42 InnoDB: Compressed tables use zlib 1.2.8
160110 14:10:41 InnoDB: Using Linux native AIO
160110 14:10:41 InnoDB: Initializing buffer pool, size = 128.0M
160110 14:10:41 InnoDB: Completed initialization of buffer pool
160110 14:10:41 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
160110 14:10:42 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use$
160110 14:10:42 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
160110 14:10:42 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160110 14:10:42 InnoDB: The InnoDB memory heap is disabled
160110 14:10:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160110 14:10:42 InnoDB: Compressed tables use zlib 1.2.8
160110 14:10:42 InnoDB: Using Linux native AIO
160110 14:10:42 InnoDB: Initializing buffer pool, size = 128.0M
160110 14:10:42 InnoDB: Completed initialization of buffer pool
160110 14:10:42 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
I've tried chmod 777 and chown mysql:mysql to the mounted folder (/var/www/html/DB/) but the result is same. After using chown, I can even see that the owner is now mysql. So why MySQL is failing to access the folder?
I've seen similar question here but most of the accepted answers are reinstalling MySQL. That's not a solution to me. It's simply bypassing the problem. Any better answer?
Can you check that you have set all your config file where you have to change directory path in my.cnf
Also make sure you have change the profile for mysqld that mean you have to update AppArmor config file so it will get the new directory.
Check this link https://blogs.oracle.com/jsmyth/entry/apparmor_and_mysql
I hope this will work!!

Can't initiate mysql in MAC OS X 10.7.5

I installed MySQL through a package located in MySQL site.
I changed this directory:
/usr/local/mysql-5.5.28-osx10.5-x86/data
For _mysql
However, when I try to do mysqld start, I get the following errors and warnings:
121018 18:04:17 [Warning] Can't create test file /usr/local/mysql-5.5.28-osx10.5-x86/data/homer.lower-test
121018 18:04:17 [Warning] Can't create test file /usr/local/mysql-5.5.28-osx10.5-x86/data/homer.lower-test
121018 18:04:17 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
121018 18:04:17 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121018 18:04:17 InnoDB: The InnoDB memory heap is disabled
121018 18:04:17 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
121018 18:04:17 InnoDB: Compressed tables use zlib 1.2.3
121018 18:04:17 InnoDB: Initializing buffer pool, size = 128.0M
121018 18:04:17 InnoDB: Completed initialization of buffer pool
121018 18:04:17 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
Any tips on what can be happening?
The easiest thing to do is to install the System Preferences plugin that you get with the download and start/stop MySQL using that. You can set it there to start automatically when the system restarts.

Innodb: Operating system error number 1117 in a file operation

i installed apache and mysql 5.5 on windows 7 64 bit. it worked but today mysql can not start and windows give me this error "Can't start MySQL Error 1067" when i try to start mysql manually.
.
i see this lines in error log :
120616 16:35:47 [Note] Plugin 'FEDERATED' is disabled.
120616 16:35:48 InnoDB: The InnoDB memory heap is disabled
120616 16:35:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120616 16:35:48 InnoDB: Compressed tables use zlib 1.2.3
120616 16:35:48 InnoDB: Initializing buffer pool, size = 103.0M
120616 16:35:48 InnoDB: Completed initialization of buffer pool
120616 16:35:48 InnoDB: highest supported file format is Barracuda.
120616 16:35:50 InnoDB: **Operating system error number 1117 in a file operation.**
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File name .\ib_logfile0
InnoDB: File operation call: 'Windows aio'.
InnoDB: Cannot continue operation.
what is problem and InnoDB: Operating system error number 1117 in a file operation.
?
what can i do?
i find this link. i removed the ib_logfile0 or ib_logfile1 in the data folder and it works.