gpt4 book ai didi

mysql - 无法启动 mysqld_safe

转载 作者:行者123 更新时间:2023-11-29 22:17:34 27 4
gpt4 key购买 nike

情况

我正在使用 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 文件错误。

最佳答案

听起来您正尝试同时运行 5.5 和 5.6。看起来您还有一些可能的共享路径 - 检查 5.5 配置以查看是否有任何通用值(pidfile、套接字、端口等)指向相同的位置。

关于mysql - 无法启动 mysqld_safe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31074817/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com