我刚刚将MySQL从5.1.59升级到5.6.20(OSX 10.7),现在MySQL服务器无法启动。
在MySQL Workbench(v6.1.7)中,在启动/关闭视图中,尝试启动服务器时,启动消息日志如下所示:
Could not open error log file: [Errno 2] The indicated path does not exist
2014-09-06 11:21:52 - Starting server...
2014-09-06 11:21:52 - Executing '/usr/local/mysql/support-files/mysql.server start'
2014-09-06 11:21:52 - Start server: Starting MySQL
2014-09-06 11:21:52 - Start server: .. ERROR! The server quit without updati
2014-09-06 11:21:52 - Start server: ng PID file (/usr/local/mysql/data/new-host-3.home.pid).
2014-09-06 11:21:52 - Server start done.
2014-09-06 11:21:52 - Checking server status...
2014-09-06 11:21:52 - Trying to connect to MySQL...
2014-09-06 11:21:52 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (2002)
2014-09-06 11:21:52 - Assuming server is not running
2014-09-06 11:21:52 - Checking server status...
2014-09-06 11:21:52 - Trying to connect to MySQL...
2014-09-06 11:21:52 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (2002)
2014-09-06 11:21:52 - Assuming server is not running
在/usr/local/mysql-5.6.20-osx10.7-x86_64/data/new-host-3.home.err中,内容如下:
140906 11:30:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2014-09-06 11:30:57 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-06 11:30:57 2575 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
2014-09-06 11:30:57 2575 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2014-09-06 11:30:57 2575 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2014-09-06 11:30:57 2575 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-09-06 11:30:57 2575 [Note] InnoDB: The InnoDB memory heap is disabled
2014-09-06 11:30:57 2575 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-09-06 11:30:57 2575 [Note] InnoDB: Memory barrier is not used
2014-09-06 11:30:57 2575 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-06 11:30:57 2575 [Note] InnoDB: Using CPU crc32 instructions
2014-09-06 11:30:57 2575 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-09-06 11:30:57 2575 [Note] InnoDB: Completed initialization of buffer pool
2014-09-06 11:30:57 2575 [Note] InnoDB: Highest supported file format is Barracuda.
2014-09-06 11:30:57 2575 [Note] InnoDB: 128 rollback segment(s) are active.
2014-09-06 11:30:57 2575 [Note] InnoDB: Waiting for purge to start
2014-09-06 11:30:57 2575 [Note] InnoDB: 5.6.20 started; log sequence number 1600927
2014-09-06 11:30:57 2575 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-locking'
2014-09-06 11:30:57 2575 [ERROR] Aborting
2014-09-06 11:30:57 2575 [Note] Binlog end
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'partition'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_METRICS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMPMEM'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_CMP'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_LOCKS'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'INNODB_TRX'
2014-09-06 11:30:57 2575 [Note] Shutting down plugin 'InnoDB'
2014-09-06 11:30:57 2575 [Note] InnoDB: FTS optimize thread exiting.
2014-09-06 11:30:57 2575 [Note] InnoDB: Starting shutdown...
2014-09-06 11:30:59 2575 [Note] InnoDB: Shutdown completed; log sequence number 1600937
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'BLACKHOLE'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'ARCHIVE'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'MRG_MYISAM'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'MyISAM'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'MEMORY'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'CSV'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'sha256_password'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'mysql_old_password'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'mysql_native_password'
2014-09-06 11:30:59 2575 [Note] Shutting down plugin 'binlog'
2014-09-06 11:30:59 2575 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
140906 11:30:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/new-host-3.home.pid ended
顺便提一下/ var / mysql中有一个mysql.sock文件,并且没有运行mysqld进程。
我无法运行mysql_upgrade或其他我曾向其他具有类似症状的用户建议的内容,因为我无法启动服务器。这超出了我的MySQL意识;有人可以解释一下发生了什么,以及如何修复这个烂摊子?
非常感谢任何帮助,
SVS
答案 0 :(得分:0)
dba.stackexchange.com 更好地询问了这个问题。
您在my.cnf
文件或启动脚本中指定了不受支持的选项。
[ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-locking'
[ERROR] Aborting
可能,此选项对您以前的MySQL版本有效,并且在以后的版本中被弃用(在启动期间可能会生成[WARNING]
,然后在您正在运行的版本中失效
"修复"将在my.cnf文件中找到该选项,并将其删除。 (有一个目录序列,其中mysqld查找my.cnf
文件,具体取决于版本和操作系统(/etc/my.cnf
,/etc/mysql/my.cnf
,mysql安装目录等。还可以指定选项在启动mysqld的命令行上;不太可能,该选项可能是从mysqld_safe脚本提供的。)