无法启动mysqld_safe

时间:2015-06-26 13:43:33

标签: mysql database amazon-web-services

场合

我正在使用aws ubuntu服务器。它有一个mysql 5.5。*,带有一些数据库。现在我需要安装5.6.25而不影响旧版本。

我跟着this link安装数据库。

问题

现在我无法启动mysql服务器。当我跑步时,mysqld_safe我收到以下错误

$ sudo bin/mysqld_safe --user=mysql --defaults-file=/usr/local/mysql-5.6.25/my2.cnf
150626 13:29:03 mysqld_safe Logging to '/var/log/mysql/error.log'.
150626 13:29:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150626 13:29:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

my2.cnf中的相关内容,

[client]
port        = 8889
socket      = /tmp/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /tmp/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /tmp/mysqld.pid
socket      = /tmp/mysqld.sock
port        = 8889
basedir     = /usr/local/mysql-5.6.25
datadir     = /usr/local/mysql-5.6.25/data
tmpdir      = /tmp
lc-messages-dir = /usr/local/mysql/share/mysql/english/
skip-external-locking

日志文件包含以下条目

150626 13:29:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2015-06-26 13:29:03 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-06-26 13:29:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-06-26 13:29:03 0 [Note] /usr/local/mysql-5.6.25/bin/mysqld (mysqld 5.6.25) starting as process 22267 ...
2015-06-26 13:29:03 22267 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2015-06-26 13:29:03 22267 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2015-06-26 13:29:03 22267 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql-5.6.25/bin/mysqld: Unknown error 1146
2015-06-26 13:29:03 22267 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-06-26 13:29:03 22267 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-06-26 13:29:03 22267 [Note] InnoDB: The InnoDB memory heap is disabled
2015-06-26 13:29:03 22267 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-06-26 13:29:03 22267 [Note] InnoDB: Memory barrier is not used
2015-06-26 13:29:03 22267 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-06-26 13:29:03 22267 [Note] InnoDB: Using CPU crc32 instructions
2015-06-26 13:29:03 22267 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-06-26 13:29:03 22267 [Note] InnoDB: Completed initialization of buffer pool
2015-06-26 13:29:03 22267 [Note] InnoDB: Highest supported file format is Barracuda.
2015-06-26 13:29:03 22267 [Note] InnoDB: 128 rollback segment(s) are active.
2015-06-26 13:29:03 22267 [Note] InnoDB: Waiting for purge to start
2015-06-26 13:29:04 22267 [Note] InnoDB: 5.6.25 started; log sequence number 1600797
2015-06-26 13:29:04 22267 [ERROR] /usr/local/mysql-5.6.25/bin/mysqld: unknown variable 'defaults-file=/usr/local/mysql-5.6.25/my2.cnf'
2015-06-26 13:29:04 22267 [ERROR] Aborting

2015-06-26 13:29:04 22267 [Note] Binlog end
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'partition'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'BLACKHOLE'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_METRICS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMPMEM'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_CMP'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_LOCKS'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'INNODB_TRX'
2015-06-26 13:29:04 22267 [Note] Shutting down plugin 'InnoDB'
2015-06-26 13:29:04 22267 [Note] InnoDB: FTS optimize thread exiting.
2015-06-26 13:29:04 22267 [Note] InnoDB: Starting shutdown...
2015-06-26 13:29:05 22267 [Note] InnoDB: Shutdown completed; log sequence number 1600807
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'ARCHIVE'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'MRG_MYISAM'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'CSV'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'MEMORY'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'MyISAM'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'sha256_password'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'mysql_old_password'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'mysql_native_password'
2015-06-26 13:29:05 22267 [Note] Shutting down plugin 'binlog'
2015-06-26 13:29:05 22267 [Note]
150626 13:29:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

问题

  • 为什么mysqld_safe会为pid文件提供错误。

1 个答案:

答案 0 :(得分:0)

听起来你正试图同时运行5.5和5.6。它看起来像你有一些可能的共享路径 - 检查5.5配置,看看是否有任何常见值(pidfile,socket,port等)指向相同的位置。