我刚刚将MySQL从5.1.59升级到5.6.20 (OSX10.7),现在MySQL服务器将无法启动。
在MySQL工作台(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
发布于 2014-09-06 17:13:13
您不能手动创建mysql.sock --在命令行中将其指定为mysqld的参数。
我就是这么做的
./bin/mysqld --默认值-file=./my.cnf
并启动客户端
./bin/mysql -S ./mysql.sock -u根-pdba
mysqld和mysql客户端都是从basedir启动的。
这是我的my.cnf --有点乱,但希望它能帮上忙。我要强调的是,这不是生产服务器!
[mysqld]
#
# * Basic Settings
#
user = pol
pid-file = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysqld.pid
socket = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysql.sock
port = 3306
basedir = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64
datadir = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/data
tmpdir = /tmp
pid-file = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysql.pid
lc-messages-dir = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/share
lc-messages = en_US
general_log = on
general_log_file= /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/logfile.txt
#log_error = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/error.log
log-error = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/error.log
slow_query_log_file = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/slow_query.log
slow_query_log = 0
explicit-defaults-for-timestamp = TRUE
#language = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/share/english
# bind-address = 0.0.0.0 - may not need c.f. host...
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[client]
port = 3306
socket = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysqld.sock
host = 127.0.0.1
user = pol
# or maybe localhost... cf. bind-address above...
# added from http://dev.mysql.com/doc/refman/5.6/en/load-data-local.html
# to allow for abrowse to load data!
#loose-local-infile = 1
local-infile = 1
[mysqld_safe]
#user = linehanp
#socket = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysql.sock
#err-log = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/error.log
#pid-file = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/mysql.pid
#log_error = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/error.log
#log-error = /home/pol/Downloads/mysql/mysql5.6.19/mysql-5.6.19-linux-x86_64/error.log发布于 2014-09-06 20:32:17
又过了一天,我谷歌了一次又一次的错误广告,再次看到,对于许多用户来说,mysql安装是无穷无尽的地狱--平台、版本和安装方法就是其中之一--我决定放弃修复这个错误(我有一个项目要做,在mysql上已经浪费了两天时间),然后卸载5.6,然后看看prev版本是否会运行。但在这么做之前我觉得再运行安装程序也没什么坏处,所以我做了.现在这该死的事情开始时没有错误。有这么多的环境差异,错误和其他患者的建议,等等,我不知道是什么原因造成了这一切。如果有人还在听,我有一个后续的问题:因为我的数据没有一个是关键的(这都是测试开发的东西),所以我没有转储它,也没有为新版本的复活做好准备。但是,如果可以访问它而不破坏新的mysql安装所创建的任何模式,我想尝试一下。再次感谢。
https://dba.stackexchange.com/questions/75885
复制相似问题