无法通过 XAMPP 和 phpMyAdmin 访问 MySQL

Can#39;t access MySQL through XAMPP and phpMyAdmin(无法通过 XAMPP 和 phpMyAdmin 访问 MySQL)
本文介绍了无法通过 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)

我有一段时间没有尝试访问它,所以我不知道自上次以来发生了什么变化.任何人都可以为我阐明这一点吗?我在谷歌上搜索过,似乎无法理解大多数人在相关问题中谈论的内容.

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.

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)