【发布时间】:2017-10-03 07:57:39
【问题描述】:
我正在运行 mac OS sierra,并且在机器上安装了多个 MySQL。一个是手动安装的,另一个是用 Homebrew 安装的。我连接和使用 MySQL 没有问题,我认为它是 Homebrew 版本,但老实说我不知道。
我正在处理一个 sock 错误,该错误表明我正在使用的应用程序无法连接到 MySQL(在我的本地 Mac 上),从那以后我一直在挖掘。该应用程序通过 http 运行,连接应该没有问题,但我收到以下错误,导致我发现了两个 mysql 安装。有道理,因为当我拿到机器时,我安装了 mysql,然后才开始使用自制软件。
Connection Test Failed:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
任何想法如何首先确定默认使用哪个版本然后删除未使用的版本?请注意,默认运行的实例可以通过我用来管理本地数据库的所有客户端正常连接。
更新: 在 Cellar /usr/local/Cellar/mysql/5.6.25 中有一个文件夹,然后在 /usr/local/var/mysql/ 中有另一个版本,这是我所有数据库所在的那个。
mysqld stop 呈现以下错误并让我相信 mysqld 正在控制我要删除的 MySQL 版本:
$ mysqld stop
2017-05-04 18:44:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-04 18:44:54 0 [Note] mysqld (mysqld 5.6.25) starting as process 1718 ...
2017-05-04 18:44:54 1718 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2017-05-04 18:44:54 1718 [Note] Plugin 'FEDERATED' is disabled.
2017-05-04 18:44:54 1718 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-04 18:44:54 1718 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-04 18:44:54 1718 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-04 18:44:54 1718 [Note] InnoDB: Memory barrier is not used
2017-05-04 18:44:54 1718 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-05-04 18:44:54 1718 [Note] InnoDB: Using CPU crc32 instructions
2017-05-04 18:44:54 1718 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-04 18:44:54 1718 [Note] InnoDB: Completed initialization of buffer pool
2017-05-04 18:44:54 1718 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-05-04 18:44:54 1718 [Note] InnoDB: Check
or log files.
2017-05-04 18:43:41 1635 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-05-04 18:43:41 1635 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
【问题讨论】:
标签: mysql linux macos homebrew