Can#39;t access MySQL through XAMPP and phpMyAdmin(无法通过 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:
- 打开终端
导航到 XAMPP 配置文件夹
- Open Terminal
Navigate to the XAMPP config folder
cd/Applications/XAMPP/xamppfiles/etc/
设置my.cnf
的权限为600
sudo chmod 600 my.cnf
重启 MySQL.
这篇关于无法通过 XAMPP 和 phpMyAdmin 访问 MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法通过 XAMPP 和 phpMyAdmin 访问 MySQL
基础教程推荐
- SQL Server 2016更改对象所有者 2022-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01