Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

How to Fix “Can’t Create/Write to File” Error Code 13 in XAMPP

Sandeep Kumar Mishra
Sandeep Kumar Mishra
in Posts > Tech
December 15, 2012
5 minutes read
How to Fix “Can’t Create/Write to File” Error Code 13 in XAMPP

Sometimes on Mac, you might encounter an error while using PHPMyAdmin that reads:

#1 – Can’t create/write to file ‘/var/folders/_y/dsf4990dfdk23343kfl2k4ld/T/#sql1e2_1_0.MYI’ (Errcode: 13)

This error typically indicates a permission issue with the my.cnf file in your XAMPP configuration. Thankfully, this can be resolved by adjusting the file permissions. Follow the steps below to fix this error and get your PHPMyAdmin running smoothly again.

WP Security Questions Pro Plugin

WP Security Questions Pro

Make your WordPress login safer with easy security questions — no coding skills needed.
Get Instant Access - Download Now

Step-by-Step Guide to Fix the PHPMyAdmin Error

Follow these steps to set the correct permissions for the my.cnf file:

  1. Open Terminal: You can find Terminal in the Utilities folder within your Applications folder, or simply use Spotlight search (Cmd + Space) and type “Terminal”.
  2. Navigate to the XAMPP Config Folder: Use the following command to navigate to the XAMPP configuration directory.
  3. cd /Applications/XAMPP/xamppfiles/etc/
  4. Set Permissions of my.cnf to 600: This step involves changing the permissions of the my.cnf file to ensure it is secure and accessible only to the owner. Enter the following command:
  5. sudo chmod 600 my.cnf
  6. Restart MySQL: Finally, restart MySQL to apply the changes. This can be done through the XAMPP control panel or by using the following command:
  7. sudo /Applications/XAMPP/xamppfiles/bin/mysql.server restart

Additional Tips:

  • Ensure you have administrative privileges to run the sudo command.
  • If the problem persists, double-check the file path and permissions.
  • Consult the PHPMyAdmin documentation for more detailed troubleshooting tips.

Conclusion

By following these steps, you should be able to resolve the PHPMyAdmin error related to file permissions on your Mac. Adjusting the my.cnf permissions to 600 ensures that the file is secure and that PHPMyAdmin can create and write to the necessary files without any issues.

If you found this guide helpful, feel free to share it with others who might be facing the same issue. For more tips and tutorials, stay tuned to our blog.

Access Premium WordPress Plugins

Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.