背景:我剛剛更新OS X給小牛,然後使用:rm -rf /usr/local
刪除brew(以及我通過自制軟件安裝的所有內容),並開始重新安裝所有內容。mysql_install_db,錯誤:35,在Mac OS X上10.9.1
brew install mysql
後,我想:
unset TMPDIR
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
但我得到:
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Installing MySQL system tables...2014-02-12 16:43:45 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-02-12 16:43:45 2358 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-02-12 16:43:45 2358 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-12 16:43:45 2358 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-02-12 16:43:45 2358 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-12 16:43:45 2358 [Note] InnoDB: Using CPU crc32 instructions
2014-02-12 16:43:45 2358 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-02-12 16:43:45 2358 [Note] InnoDB: Completed initialization of buffer pool
2014-02-12 16:43:45 2358 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-02-12 16:43:45 2358 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-02-12 16:43:45 2358 [Note] InnoDB: Retrying to lock the first data file
2014-02-12 16:43:46 2358 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2014-02-12 16:43:46 2358 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
我總覺得完全失去了,並開始google搜索,我只喜歡這一點,這似乎是有幫助的:http://blog.tiagocarvalho.pt/2014/01/mac-os-x-mysql-problems.html
閱讀後,仍然沒有得到一個清晰的圖片,但我的想法是(根據該職位): FIRST:ki ll -9(mysql PID)然後(我認爲)我應該可以再次嘗試mysql_install_db
。
所以我試過了,ps xua | grep mysql
顯示:
4683 0.0 0.0 2442000 624 s001 S+ 7:39下午 0:00.01 grep mysql
4547 0.0 3.3 3080024 68276 ?? S 7:18下午 0:00.98 /usr/local/Cellar/mysql/5.6.16/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.6.16 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mysql/5.6.16/lib/plugin --log-error=/usr/local/var/mysql/UU.local.err --pid-file=/usr/local/var/mysql/UU.local.pid
4476 0.0 0.0 2436436 808 ?? S 7:18下午 0:00.02 /bin/sh /usr/local/bin/mysqld_safe
,但kill -9 4547
和kill -9 4476
後,他們又用兩個不同的PID出現了......
我不知道是怎麼回事...任何提示?
而且,如果我做mysql.server stop
,然後mysql.server status
我會找到它重新啓動......
嗯......我有這個完全相同的問題,但我似乎沒有* * *在/ Library/LaunchAgents下的自制軟件條目。如果我解決了這個問題,我會添加另一個答案,以防別人遇到同樣的問題。 (PS - 我不知道爲什麼有人會低估這個問題,這是關於主題,詳細的,並顯示研究工作。) – LindaJeanne
非常感謝你卸載命令...我不得不謀殺和重新安裝MySQL,這個錯誤讓我瘋了 – caro