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

标签 mysql macos xampp macos-sierra

我昨天下载了 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

而且我不知道如何解决这个错误。我已多次重启操作系统并确保没有实例已在运行。

请帮忙!

编辑
我刚刚重新安装了 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 手动安装它们。

如果您刚刚购买了 macbook,您应该可以下载 xcode,我相信您应该可以安装 xcode,这样您就可以使用 mac ports 命令行安装它们。

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

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

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

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

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

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

您应该将您的源表和备份表打包并在您的个人计算机上重新安装所有内容。

关于mysql - XAMPP MySQL 在 MacBook Air (MacOS Sierra 10.12.2) 上启动失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41272341/

相关文章:

mysql - 如何拆分逗号分隔值

mysql - 数据库查询和索引

macos - 如何卸载 vim 的 Pathogen?

python - env: python\r: 没有这样的文件或目录

在 MAC 上编译 SDL

mysql - 使用 VB.Net 将日期从 mm-dd-yyyy 转换为 MySql 格式

php - SPIP:从标签直接到文章

php - 我的Mysql创建过程出错的原因是什么

xampp - 将 Xampp 的 htdocs 文件夹移动到外部 USB 2.0 硬盘

php - 无法访问 localhost/phpmyadmin RouteCollection.php 第 161 行中的 NotFoundHttpException