XAMPP MySQL 启动在 MacBook Air (MacOS Sierra 10.12.2) 上失败
Posted
技术标签:
【中文标题】XAMPP MySQL 启动在 MacBook Air (MacOS Sierra 10.12.2) 上失败【英文标题】:XAMPP MySQL Startup fails on MacBook Air (MacOS Sierra 10.12.2) 【发布时间】:2017-05-07 10:35:47 【问题描述】:我昨天正在下载 XAMPP v7.0.13-0
,我遇到了mysql MariaDB 无法启动的问题,我不知道为什么它不会,我试图从“MacOS 终端”运行该应用程序。应用
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 开发者版本(适用于 SierraOS)的默认设置,我联系了 Apple 支持,并被告知搜索 /private/dev/.adb/app.plist
并将其删除。
删除 plist 文件后,他们告诉我导航到 /private/.databases/
并删除 .StartDBOnStartup
。重新启动我的 mac 后,它工作了,并且不再使用该端口。
我不太确定它是什么实例,但无论如何它都没有显示在终端中。
【问题讨论】:
好像是权限问题,你试过了吗:***.com/questions/9046977/… 刚试了,没用 在新日志中,MySQL 似乎已经在运行,而且是旧版本。打开终端并输入:netstat -lp | grep 3306
,你可以找到已经运行的mysql的pid,然后用kill <pid>
结束它。那应该可以解决它(希望如此)。
@Sonu 该命令只是说我必须在 netstat 中输入一个参数
在终端试试这个kill -9 $(lsof -t -i :3306)
【参考方案1】:
终端上的命令很少。当你开始你的mamp时,你应该 查看错误消息。
查找 unix 命令。我认为它是 netstat 组合或管道,您可以称之为它。
我相信您可以在 mamp 控制面板中分配端口。有很多方法可以在 osx 上安装 mysql php 和 apache。
您可以使用 mamp。 您可以使用 macports 手动安装它们。
如果你刚刚购买了你的 macbook,你应该能够下载 xcode,我相信你应该能够安装 xcode,这将允许你使用 mac ports 命令行安装它们。
查看在线文档。只需按照说明进行操作,就可以了。
您是否安装了其他可能与 mysql 端口冲突的应用程序,例如 skype。您可以手动分配mysql端口。
尝试查看使用端口 3306 的内容。您需要找到该应用程序并将其卸载,然后才能有人抓住您的电脑并重新启动它。
这发生在我在亚马逊 AWS 上的服务器上。我花了数周时间修复它。这甚至发生在我朋友的电脑上。我相信他有他的大学朋友试图教他如何在没有任何经验的情况下安装灯组,我们花了数周时间修复它。
我认为你模糊了你的 innodb 表。您可能需要在备份后删除 /var/lib/mysql 表并尝试重新启动 mysql。
如果我是你,我会重新安装 osx 并从头开始。我以前做过,需要很长时间。
您应该压缩源表和备份表并在您的个人计算机上重新安装所有内容。
【讨论】:
它是打开的,当我检查终端时,3306 没有打开端口,这是 Apple Software 托管的东西吗?以上是关于XAMPP MySQL 启动在 MacBook Air (MacOS Sierra 10.12.2) 上失败的主要内容,如果未能解决你的问题,请参考以下文章
将 XAMPP 文件夹移动到新计算机,现在在尝试启动 MySQL 时出现“(XAMPPErrorDomain error 1.)”
Xampp 无法在 m1 Macbook pro 上运行,给我一个错误: