Xampp MySql没有启动(mac)

时间:2015-02-13 01:58:36

标签: mysql macos xampp

当我从Xampp启动Mysql时没有任何反应。 这是日志:

2015-02-12 20:45:14 6090 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/Thomass-MacBook-Air.local.pid ended
2015-02-12 20:49:20 6770 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
2015-02-12 20:49:21 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-02-12 20:49:21 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-02-12 20:49:21 7138 [Warning] Setting lower_case_table_names=2 because file system for /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
2015-02-12 20:49:21 7138 [Note] Plugin 'FEDERATED' is disabled.
2015-02-12 20:49:21 7138 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-02-12 20:49:21 7138 [Note] InnoDB: The InnoDB memory heap is disabled
2015-02-12 20:49:21 7138 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-02-12 20:49:21 7138 [Note] InnoDB: Memory barrier is not used
2015-02-12 20:49:21 7138 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-02-12 20:49:21 7138 [Note] InnoDB: Using CPU crc32 instructions /Applications/XAMPP/xamppfiles/sbin/mysqld: Can't create/write to file '/Applications/XAMPP/xamppfiles/temp/mysql/ib7sYHPC' (Errcode: 13 - Permission denied)
2015-02-12 20:49:21 7fff738e6310  InnoDB: Error: unable to create temporary file; errno: 13
2015-02-12 20:49:21 7138 [ERROR] Plugin 'InnoDB' init function returned      error.
2015-02-12 20:49:21 7138 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-02-12 20:49:21 7138 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-02-12 20:49:21 7138 [ERROR] Aborting

非常感谢你的帮助。

编辑:感谢您快速回复家伙!

我重新安装了XAMPP,现在一切正常。再次感谢。

3 个答案:

答案 0 :(得分:2)

你需要chmod(更改权限)目录,以便mysql可以写入它。您会注意到错误代码也提到了这一点:

Can't create/write to file '/Applications/XAMPP/xamppfiles/temp/mysql/ib7sYHPC' (Errcode: 13 - Permission denied)

你如何开始它可能也很重要。从终端试试这个:

sudo chmod -R 777 /Applications/XAMPP/xamppfiles/temp/mysql

答案 1 :(得分:1)

我发现它在我的日志文件中,名称为:

/Applications/XAMPP/xamppfiles/var/mysql/<User>.lan.err

在日志文件中,我找到了日志消息:

/Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0 can't be opened in read-write mode

然后我去了这个目录并执行了以下命令,以便为2个日志文件的所有用户更改rw权限:

chmod +666 ib_logfile0 
chmod +666 ib_logfile1

之后,我执行了ls -l command and my -rw-rw-rw are correct:

-rw-rw-rw-   1 PerEskilson  admin  50331648 Oct 19 23:17 ib_logfile0
-rw-rw-rw-   1 PerEskilson  admin  50331648 Oct 12 13:24 ib_logfile1

完成此操作后,我的数据库启动正常。

答案 2 :(得分:0)

由于程序安装不正确,尝试卸载程序然后重新安装,可能会发生这种情况,请确保删除所有文件(临时文件和快捷方式)以确保它们不会导致问题。

希望这可以解决问题 - 吉姆