Search code examples
mysqlimportphpmyadminxamppdump

Uploading small .sql file to MySQL database file returns error (XAMPP on OS X)


I am running a fresh install of XAMPP 1.8.2 for OSX and am currently trying to upload an exported database that is 171kb in size.

Getting hit with this error Warning: File upload error - unable to create a temporary file in Unknown on line 0

From what I have discovered it may have something to do with write permissions to a /tmp file which doesn't seem to exist on my system.

Trying to set this up so I can make changes locally on a clients website without breaking the live site.

Cheers and thanks for taking a look.


Solution

  • Solved

    within the file uploads section of your php.ini there resides this:

    ;upload_tmp_dir =

    To allow for uploads uncomment and give the tmp dir a home:

    upload_tmp_dir = "/tmp"

    The the most recent default installation of XAMPP on Lion has a couple of very important lines commented out (in regards to phpmyadmin/mysql). Not sure why, but I would love to learn the reasoning behind it.