In the process of moving data from my old pc to the new macbook pro, I have had a terrible time trying to get my development environment to run smoothly. After trying to get the apache/mysql/php stack that comes with leopard to work, I scratched it and thought I would try something simpler for time’s sake. I downloaded and used MAMP for a while, but the web app I deal with most of the time, SugarCRM, didn’t like the default ports MAMP ran on, so I tried to change them. This, of course, caused several more conflicts. Tired of dealing with MAMP and with a suggestion from my personal mac genius, Chris Faulkner, I downloaded and installed XAMPP. I have used XAMPP on the Windows side of the virtual pond, so I was pretty comfortable with it. Everything seemed to be running with no problems. Great. Now all I need to do is move over my database. Only problem, the phpMyAdmin version that comes bundled with the Mac XAMPP installer is an older version. Whenever I tried to import my file full of SQL queries, phpMyAdmin would error out with a vague “File could not be read” message. After trying everything to fix the problem, I scratched trying to fix the old version and just downloaded the latest version of phpMyAdmin, dropped it into the XAMPP htdocs folder and it worked like a champ.
Another thing to keep in mind, if your file is too large and cannot be uploaded due to php or phpMyAdmin restrictions, there is a very simple way around it. Open up your phpMyAdmin config.inc.php file. On the Mac, that is found in XAMPP/xamppfiles/phpmyadmin folder. Search that file for “$cfg[’UploadDir’]”. If the quotes are empty, give it a directory name such as ‘upload/import’. Whatever folder you assign the variable, make sure the directory(ies) exist. Place the large file you wish to import into the given directy. Now, go back to phpMyAdmin in the browser and click on the import option. You should see a drop down underneath the place you would usually click to select the file you would upload. Select the file you moved to the given upload directy and press go. That should do it for you. Feel free to leave any questions or comments.

Leave your Comment