我尝试运行以下内容:
$ mysqld start
但我得到了这个记录:
2015-02-19 01:41:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-02-19 01:41:48 37487 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2015-02-19 01:41:48 37487 [Note] Plugin 'FEDERATED' is disabled.
2015-02-19 01:41:48 37487 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-02-19 01:41:48 37487 [Note] InnoDB: The InnoDB memory heap is disabled
2015-02-19 01:41:48 37487 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-02-19 01:41:48 37487 [Note] InnoDB: Memory barrier is not used
2015-02-19 01:41:48 37487 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-02-19 01:41:48 37487 [Note] InnoDB: Using CPU crc32 instructions
2015-02-19 01:41:48 37487 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-02-19 01:41:48 37487 [Note] InnoDB: Completed initialization of buffer pool
2015-02-19 01:41:48 37487 [Note] InnoDB: Highest supported file format is Barracuda.
2015-02-19 01:41:49 37487 [Note] InnoDB: 128 rollback segment(s) are active.
2015-02-19 01:41:49 37487 [Note] InnoDB: Waiting for purge to start
2015-02-19 01:41:49 37487 [Note] InnoDB: 5.6.21 started; log sequence number 512233130
mysqld: Too many arguments (first extra is 'start').
Use --verbose --help to get a list of available options
2015-02-19 01:41:49 37487 [ERROR] Aborting
2015-02-19 01:41:49 37487 [Note] Binlog end
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'partition'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_METRICS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_CMP'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'INNODB_TRX'
2015-02-19 01:41:49 37487 [Note] Shutting down plugin 'InnoDB'
2015-02-19 01:41:49 37487 [Note] InnoDB: FTS optimize thread exiting.
2015-02-19 01:41:49 37487 [Note] InnoDB: Starting shutdown...
2015-02-19 01:41:50 37487 [Note] InnoDB: Shutdown completed; log sequence number 512233140
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'BLACKHOLE'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'ARCHIVE'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'MRG_MYISAM'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'MyISAM'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'MEMORY'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'CSV'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'sha256_password'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'mysql_old_password'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'mysql_native_password'
2015-02-19 01:41:50 37487 [Note] Shutting down plugin 'binlog'
2015-02-19 01:41:50 37487 [Note] mysqld: Shutdown complete
遇到这个问题后,我从cakebrew中卸载并重新安装了mysql。
我记得我之前运行过mysql服务器,但我不知道为什么我现在无法运行它。任何提示?我试过寻找类似的问题,但似乎问题非常具体:S
答案 0 :(得分:2)
问题就在这里:
mysqld: Too many arguments (first extra is 'start').
Use --verbose --help to get a list of available options
2015-02-19 01:41:49 37487 [ERROR] Aborting
它告诉你,在mysqld命令之后它并不理解start
这个词。您确实使用了start
,但它不是那样的。
使用:
mysqld --verbose --help
为便于阅读,您可以使用:
mysqld --verbose --help | more
要获取您可能想要启动它的选项列表。
启动它的最简单方法是:
mysqld &
这将介绍该过程,但这可能不是您想要运行它的方式。我不使用cakebrew,但是使用自制软件,这是我用来启动mysql的命令。
mysql.server start
另外,你可以使用lanchctl:
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist