Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have setup a MySQL 5.6.17 server on my Mac OSX 10.9 to run some demo (I usually do not attempt MySQL and Apache things on a Mac), using Homebrew.

Everything went just fine (apart usual stinky parts about the mysql.sock file not being in the right place)

BUT: When I start my machine, it is supposed to be up and running. However, most (if not all) of the time, it isn't. When I go for sudo /usr/local/bin/mysql.server start, I get that:

iMac-de-Mathieu:~ mathieubolla$ sudo /usr/local/bin/mysql.server start
Password:
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-de-Mathieu.local.pid).

I can do it repeatedly, nothing happens.

But I discovered something even more interesting: If I cd /usr/local/Cellar/mysql/5.6.17/bin and I repeatedly delete the error file and attempt sudo mysql.server start, it will eventually work.

Here is a log I obtained while writing this message:

iMac-de-Mathieu:bin mathieubolla$ sudo mysql.server
Usage: mysql.server  {start|stop|restart|reload|force-reload|status}  [ MySQL server options ]
iMac-de-Mathieu:bin mathieubolla$ sudo mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-de-Mathieu.local.pid).
iMac-de-Mathieu:bin mathieubolla$ sudo rm /usr/local/var/mysql/iMac-de-Mathieu.local.err
iMac-de-Mathieu:bin mathieubolla$ sudo mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-de-Mathieu.local.pid).
iMac-de-Mathieu:bin mathieubolla$ sudo rm /usr/local/var/mysql/iMac-de-Mathieu.local.err
iMac-de-Mathieu:bin mathieubolla$ sudo mysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-de-Mathieu.local.pid).
iMac-de-Mathieu:bin mathieubolla$ sudo rm /usr/local/var/mysql/iMac-de-Mathieu.local.err
iMac-de-Mathieu:bin mathieubolla$ sudo mysql.server start
Starting MySQL
. SUCCESS! 

I sure am a newbie at MySQL administration, even more on Mac OSX. But I'm also a veteran programmer, and I barely get any good reason why a software like MySQL may exhibit unpredictable behavior at startup. I understand some things can get non deterministic when running multithreaded soft sometimes, but starting up a data server, I do not know...

Any ideas what may be going on?

Here is error log:

140507 10:20:50 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2014-05-07 10:20:51 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation     for more details).
2014-05-07 10:20:51 11262 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/Cellar/mysql/5.6.17/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2014-05-07 10:20:51 11262 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2014-05-07 10:20:51 11262 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-05-07 10:20:51 11262 [Note] InnoDB: The InnoDB memory heap is disabled
2014-05-07 10:20:51 11262 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-05-07 10:20:51 11262 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-05-07 10:20:51 11262 [Note] InnoDB: Using CPU crc32 instructions
2014-05-07 10:20:51 11262 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-05-07 10:20:51 11262 [Note] InnoDB: Completed initialization of buffer pool
2014-05-07 10:20:51 11262 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2014-05-07 10:20:51 11262 [ERROR] InnoDB: The system tablespace must be writable!
2014-05-07 10:20:51 11262 [ERROR] Plugin 'InnoDB' init function returned error.
2014-05-07 10:20:51 11262 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-05-07 10:20:51 11262 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-05-07 10:20:51 11262 [ERROR] Aborting

2014-05-07 10:20:51 11262 [Note] Binlog end
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'partition'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_METRICS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMPMEM'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_CMP'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_LOCKS'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'INNODB_TRX'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'BLACKHOLE'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'ARCHIVE'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'MRG_MYISAM'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'MyISAM'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'MEMORY'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'CSV'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'sha256_password'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'mysql_old_password'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'mysql_native_password'
2014-05-07 10:20:51 11262 [Note] Shutting down plugin 'binlog'
2014-05-07 10:20:51 11262 [Note] /usr/local/Cellar/mysql/5.6.17/bin/mysqld: Shutdown complete

140507 10:20:51 mysqld_safe mysqld from pid file /usr/local/var/mysql/iMac-de-Mathieu.local.pid ended
share|improve this question

migrated from serverfault.com May 7 at 21:03

This question came from our site for professional system and network administrators.

1  
"InnoDB: ./ibdata1 can't be opened in read-write mode" does that file exist? is it writeable for the MySQL database? Are you sure no other process is accessing this file? –  MKzero May 7 at 8:31
    
I think so. I get -rw-rw---- 1 mathieubolla admin 76M 7 mai 10:20 ibdata1 when I ls /usr/local/var/mysql/. Moreover, I do not change permissions when I run multiple startup attempts. I'll check the "other process" problem... Just have to remember how... –  mathieubolla May 7 at 8:58
    
lsof | grep ibdata1 returns nothing. I suppose this is proof nothing opens this file in my back, but not sure... –  mathieubolla May 7 at 9:01
    
I think I see what seems to be the problem.. Under what user/group is your MySQL started? For me it looks like your data directory got messed up permissions.. –  MKzero May 7 at 13:36
    
But how could it start sometimes? I'm sure you're right, there is something bad with my permissions, but how could that vary with time? It might be an auxiliary problem that I have to fixe someday... –  mathieubolla May 7 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.