Can't access MySQL through XAMPP and phpMyAdmin

43,869

Solution 1

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.

Solution 2

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à!

Solution 3

you have to go to your xampp installation directory and change the permissions of my.cnf to 600

Share:
43,869
MillerMedia
Author by

MillerMedia

Thanks for the help! Any programmers looking for subcontractor work, feel free to e-mail me at [email protected] . We're always looking for great workers. Thanks!

Updated on July 23, 2022

Comments

  • MillerMedia
    MillerMedia almost 2 years

    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