XAMPP MySQL 在 MacBook Air (MacOS Sierra 10.12.2) 上启动失败

XAMPP MySQL Startup fails on MacBook Air (MacOS Sierra 10.12.2)

我昨天在下载 XAMPP v7.0.13-0 时遇到了 MySQL MariaDB 无法启动的问题,我不确定为什么不能,我试过了运行 来自 `MacOS Terminal.app

的应用程序
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

导致错误:

Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
Starting MySQL
.
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
2016-12-21 22:33:01 2727 mysqld_safe Logging to '/Applications/XAMPP/xamppfiles/var/mysql/localhost.local.err'.
..
ERROR!

来自 XAMPP 的日志文件如下所示:

2016-12-21 22:24:59 2189 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
2016-12-21 22:24:59 140735798543296 [Note] /Applications/XAMPP/xamppfiles/sbin/mysqld (mysqld 10.1.19-MariaDB) starting as process 2258 ...
2016-12-21 22:24:59 140735798543296 [Warning] Setting lower_case_table_names=2 because file system for /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: The InnoDB memory heap is disabled
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Using SSE crc32 instructions
2016-12-21 22:24:59 140735798543296 [ERROR] mysqld: Can't create/write to file '/var/folders/11/hxbjwwm94txfzqw5mt_yj_x40000gn/T/ibS5h9p3' (Errcode: 13 "Permission denied")
2016-12-21 22:24:59 7fff9b4783c0  InnoDB: Error: unable to create temporary file; errno: 13
2016-12-21 22:24:59 140735798543296 [ERROR] Plugin 'InnoDB' init function returned error.
2016-12-21 22:24:59 140735798543296 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-12-21 22:24:59 140735798543296 [Note] Plugin 'FEEDBACK' is disabled.
2016-12-21 22:24:59 140735798543296 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-12-21 22:24:59 140735798543296 [ERROR] Aborting

2016-12-21 22:24:59 2189 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/localhost.local.pid ended

而且我不知道如何解决这个错误。我已经重新启动 OS 几次并确保没有实例已经 运行ning.

请帮忙!

编辑
我刚重装了XAMPP,现在日志有点不一样了:

2016-12-21 22:54:49 5687 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
2016-12-21 22:54:50 140735798543296 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2016-12-21 22:54:50 140735798543296 [Note] /Applications/XAMPP/xamppfiles/sbin/mysqld (mysqld 10.1.19-MariaDB) starting as process 5833 ...
2016-12-21 22:54:50 140735798543296 [Warning] Setting lower_case_table_names=2 because file system for /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: The InnoDB memory heap is disabled
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Using SSE crc32 instructions
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Completed initialization of buffer pool
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Highest supported file format is Barracuda.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: 128 rollback segment(s) are active.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Creating zip_dict and zip_dict_cols system tables.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: zip_dict and zip_dict_cols system tables created.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Waiting for purge to start
2016-12-21 22:54:50 140735798543296 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.32-79.0 started; log sequence number 1762733
2016-12-21 22:54:50 123145331998720 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-12-21 22:54:50 140735798543296 [Note] Plugin 'FEEDBACK' is disabled.
2016-12-21 22:54:50 140735798543296 [Note] Server socket created on IP: '::'.
2016-12-21 22:54:50 140735798543296 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 48: Address already in use
2016-12-21 22:54:50 140735798543296 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2016-12-21 22:54:50 140735798543296 [ERROR] Aborting

2016-12-21 22:54:52 5687 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/localhost.local.pid ended

答案:有一个 AppleDB 实例,它是 Apple Developer Version(对于 SierraOS)的默认实例,我联系了 Apple 支持,被告知搜索 /private/dev/.adb/app.plist 并删除它。

删除 plist 文件后,他们告诉我导航到 /private/.databases/ 并删除 .StartDBOnStartup。重新启动我的 mac 后,它工作正常,端口不再使用。

我不太确定它是什么实例,但无论如何它都没有在终端中显示。

终端上的命令很少。当您开始使用 mamp 时,您应该 查看错误消息。

查找 unix 命令。我认为它是 netstat 组合或管道,您可以称之为它。

我相信你可以在 mamp 控制面板中分配端口。您可以通过多种方式在 osx 上安装 mysql php 和 apache。

您可以使用 mamp。 您可以使用 macports 手动安装它们。

如果您刚刚购买了 mac 书籍,您应该可以下载 xcode 并且我相信您应该可以安装 xcode,这将允许您安装它们mac 端口命令行。

在线查看文档。只需按照说明进行操作,您应该没问题。

您是否安装了其他应用程序,例如 skype,它可能与 mysql 端口冲突。您可以手动分配 mysql 端口。

尝试查看什么正在使用端口 3306。您需要找到该应用程序并将其卸载,然后其他人才能控制您的电脑并重新启动它。

这发生在我在 amazon aws 上的服务器上。我花了数周时间修复它。这甚至发生在我朋友的电脑上。我相信他让他的大学朋友在没有任何经验的情况下试图教他如何安装 lamp 堆栈,我们花了数周时间来修复它。

我认为你模糊了你的 innodb 表。您可能需要在备份后删除 /var/lib/mysql 表并尝试重新启动 mysql.

如果我是你,我会重新安装 osx 并从头开始。我以前做过,这需要很长时间。

你应该压缩你的源表和备份表并在你的个人电脑上重新安装所有的东西。