不要被你所看到的所迷惑。
mysqld 不会在同一 datadir 和 ibdata1 上有多个实例。我怎么知道这个?
2014 年 9 月 26 日,我回答MySQL gets signal 11 error and Slave is down。在我的回答中,我提到了 InnoDB 架构如何只允许一个 mysqld 进程向 ibdata1 打开主线程。
因此,如果您在错误日志中没有看到以下行
6 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-09-26 12:51:53 14166 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2014-09-26 12:51:53 14166 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
Run Code Online (Sandbox Code Playgroud)
鉴于这些事情,我向你保证,你没有多个 mysqld 进程。
那么,你看到了什么?这些是来自 mysqld 实例的实际数据库连接。我已经看到这种奇怪的显示来自 mysqld 的源编译版本。我在我的旧帖子innodb_buffer_pool_size notchanged和Identical mysqlprocesses (ServerFault)中提到了这一点。我怀疑操作系统将数据库连接显示为 mysqld 进程。相反,它们只是普通的数据库连接。
你应该在 Linux 中运行它
ps -ef | grep mysqld | grep -v grep | wc -l
Run Code Online (Sandbox Code Playgroud)
您应该得到 2 的输出(1 表示 mysqld,1 表示 mysqld_safe)
如果您只得到 1,则您可能使用的是非常旧的 MySQL 版本。
归档时间: |
|
查看次数: |
2896 次 |
最近记录: |