Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't access MySQL through XAMPP and 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.

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

Here is the error I'm getting:

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
like image 351
MillerMedia Avatar asked Oct 27 '12 02:10

MillerMedia


People also ask

How to set up XAMPP with phpMyAdmin?

You also install XAMPP to quickly set up with other tools. Head towards the phpMyAdmin folder, and open the config.inc.php file. For XAMPP, you will find it on this location ~C:\xampp\phpMyAdmin\config.inc.php Next, add the credentials of the remote database you want to connect at bottom of the config.inc.php file:

How to connect to a remote MySQL database using XAMPP?

For connecting the remote database, we will use XAMPP on Windows 10 and use phpMyAdmin console to connect to a remote database. XAMPP is a very well know tool to set up a localhost server and phpMyAdmin MySQL database management tool. You can easily download the setup and install it on your local.

How to install MySQL and phpMyAdmin on Windows 10?

How to Install MySQL and PHPMyAdmin 1 Install Xampp on your PC. 2 In your Xampp Control Panel, Start Apache and MySQL. 3 Open your browser and enter http://localhost/phpmyadmin.

How do I connect to a remote database using phpMyAdmin?

Head towards the phpMyAdmin folder, and open the config.inc.php file. For XAMPP, you will find it on this location ~C:\xampp\phpMyAdmin\config.inc.php Next, add the credentials of the remote database you want to connect at bottom of the config.inc.php file:


2 Answers

Following line in the log is the reason:

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

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

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

    cd /Applications/XAMPP/xamppfiles/etc/

  3. Set permissions of my.cnf to 600

    sudo chmod 600 my.cnf

  4. Restart MySQL.

like image 166
david Avatar answered Dec 01 '22 19:12

david


I had to reset the permissions in my xampp folder because I needed to be able to INSERT images into a folder in the htdocs, via php from website I am building.

However after I changed the permission I got : Errcode: 13

The process listed above works but I am adding some additional notes for people who have no clue how to use the terminal.

1. Open Terminal

  • The Terminal is in Applications/Utilities/Terminal

2. Navigate to the XAMPP config folder

  • pwd shows the path listing to the current directory

  • cd changes the current directory

  • ls -a lists all the files in that directory

Enter this code into the terminal: cd /Applications/XAMPP/xamppfiles/etc/

3. Set permissions of my.cnf to 600

Enter this code into the terminal: sudo chmod 600 my.cnf

4. Restart MySQL

Voilà!

like image 45
Renee Rose-Perry Avatar answered Dec 01 '22 17:12

Renee Rose-Perry