![]() ![]() This command actually starts up okay, but when I tried to generate the code for a CakePHP controller, I got the following error message: Once I got into MySQL, everything about MAMP and CakePHP worked just fine, until I tried to run the CakePHP cake bake command. The MAMP MySQL root password is " root" Solving the MAMP/PHP/MySQL/CakePHP error That makes for a nice segway to MAMP MySQL important tip #2: ![]() If you just need to access the MAMP MySQL server, just add the MAMP "bin" directory to your Mac/Unix PATH variable. Note: I created this alias because 90% of the time I need my other MySQL server running. This way, in the future, all I had to do was type this command:Īnd then supply the MySQL root password, and I was in. ![]() ![]() Applications/MAMP/Library/bin/mysql -u root -pīecause I don't like typing long commands out like that on a regular basis, I created an alias for this command, like this:Īlias my="/Applications/MAMP/Library/bin/mysql -u root -p" The MAMP MySQL client is installed in the /Applications/MAMP/Library/bin directory, so to invoke that client and log into your MAMP MySQL database as the root user, you can invoke the MySQL client like this: In my case, because I already had MySQL installed on my Mac, I ran into a few errors until I realized this. The most important thing to know is that you need to use the MySQL command line client that came with MAMP. If you're going to use the MAMP MySQL client from the command, here's a quick tip that can save you some time. In the GUI, just click the MAMP menu item, then select Preferences, and change the ports as desired. If you want to change those, you can easily change them through the MAMP GUI. One quick note all MAMP developers need to know: By default MAMP runs Apache on port 8888, and MySQL on port 8889. However, since I do work from the Mac command line I had to make a couple of quick changes to my environment to get MySQL and the CakePHP "bake" script to work properly. If so, here's what it looks like when you start it: In fact, if you don't work from the Mac OS X command line (i.e., the Terminal), MAMP might be 100% complete.Īssuming you don't work from the command line, you might be ready to use MAMP. Just download MAMP and install the MAMP folder in your Mac Applications folder, and you're almost ready to start your Mac/Apache/MySQL/PHP project. Mac LAMP development with MAMP (Mac OS X, Apache, MySQL, and PHP)įirst of all, MAMP is a terrific, free all-in-one Mac LAMP/PHP solution. In this article I'll demonstrate how I got MAMP to work for my Mac LAMP needs, in particular working through a couple of issues not covered in the MAMP installation docs, and also using MAMP with CakePHP. The reason I can comfortably say "I'll skip all the details here" is because I recently started using MAMP for my Mac PHP MySQL development, and I have no plans on looking back to the old days any time soon. I'll skip most of the details here, but getting Apache and PHP to work involves modifying the Apache configuration files under /private/etc/apache2 or /private/etc/httpd, and also getting past some Mac/MySQL/PHP socket errors I ran into. When it comes to PHP development on Mac OS X, I've always battled my way through getting Apache, MySQL, and PHP on the Mac to work the way I needed them to. In this case, we recommend that you use OS X server with the provided Apache or a Linux server.PHP LAMP Mac FAQ: Can you recommend a good way to develop Mac PHP/LAMP applications on Mac OS X? MAMP was created primarily as a PHP development environment for Mac computer and should therefore not be used as Live Webserver for the Internet. In these cases, the corresponding license applies. Please note: some of the included software is released using a different license. MAMP is released under the GNU General Public License and may thereby be distributed freely within the boundaries of this license. Similar to a Linux-Distribution, MAMP is a combination of free software and thus it is offered free of charge. MAMP does not modify any of the "normal" OS X). You can install Apache, PHP and MySQL without starting a script or having to change any configuration files!įurthermore, if MAMP is no longer needed, it is sufficient to delete the MAMP folder and everything returns to its original status (i.e. MAMP will not compromise any existing Apache installation already running with your OS X. MAMP is installed in the typical Mac fashion: very easily. Like similar packages from the Windows- and Linux-world, MAMP comes free of charge. MAMP installs a local server environment in a matter of seconds on your OS X computer, be it PowerBook or iMac. With just a few mouse-clicks, you can install Apache, PHP and MySQL for OS X! MAMP stands for: Mac, Apache, MySQL and PHP. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |