无法通过XAMPP和phpMyAdmin访问MySQL [英] Can't access MySQL through XAMPP and phpMyAdmin

查看:185
本文介绍了无法通过XAMPP和phpMyAdmin访问MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XAMPP,并且尝试通过http://localhost/phpmyadmin访问phpMyAdmin,但出现此错误消息:

I am using XAMPP and I am trying to access phpMyAdmin through http://localhost/phpmyadmin, but I'm getting this error message:

Error
SQL query: 

SHOW PLUGINS

MySQL said: 

#1 - Can't create/write to file '/var/folders/_y/gtpc137d1q9gkvsj0dsxjd040000gn/T/#sql9f2_8_0.MYI' (Errcode: 13)

我有一段时间没有尝试访问它了,所以我不知道自上次以来发生了什么变化.谁能为我阐明这一点?我已经用Google搜索,似乎无法理解大多数人在相关问题中正在谈论什么.

I haven't tried to access it in a while so I don't know what has changed since the last time. Can anyone shed light on this for me? I've Googled and can't seem to understand what most people are talking about in related issues.

此外,我的XAMPP也不会再连接到Apache(它只会不断向我提供加载图像).

Also, my XAMPP won't connect to Apache anymore either (it just keeps giving me the loading image).

这是我遇到的错误:

121201 22:59:27 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
121201 22:59:28 [Warning] Setting lower_case_table_names=2 because file system for     /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
121201 22:59:28 [Note] Plugin 'FEDERATED' is disabled. /Applications/XAMPP/xamppfiles/sbin/mysqld: Can't create/write to file '/var/folders/_y/gtpc137d1q9gkvsj0dsxjd040000gn/T/ibCVKOvf' (Errcode: 13)
121201 22:59:28  InnoDB: Error: unable to create temporary file; errno: 13
121201 22:59:28 [ERROR] Plugin 'InnoDB' init function returned error.
121201 22:59:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121201 22:59:29 [Note] Event Scheduler: Loaded 0 events
121201 22:59:29 [Note] /Applications/XAMPP/xamppfiles/sbin/mysqld: ready for connections.
Version: '5.1.44'  socket: '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock'  port: 3306  Source distribution

推荐答案

日志中的以下行是原因:

Following line in the log is the reason:

警告:世界可写的配置文件 '/Applications/XAMPP/xamppfiles/etc/my.cnf'被忽略"

"Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored"

正如Rishi Kalia所指出的那样,您必须设置正确的权限:

As Rishi Kalia has pointed out already you have to set the correct permissions:

  1. 打开终端
  2. 导航到XAMPP配置文件夹

  1. Open Terminal
  2. Navigate to the XAMPP config folder

cd/Applications/XAMPP/xamppfiles/etc/

my.cnf的权限设置为600

sudo chmod 600 my.cnf

重新启动MySQL.

Restart MySQL.

这篇关于无法通过XAMPP和phpMyAdmin访问MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆