MAMP 3 – User Guide ! ! ! March 2014 (c) appsolute GmbH! 1
!! !! !! !! !! !! !! !! I. Installation! 3! 1. Installation requirements! 3! 2. Installing and upgrading! 3! 3. Uninstall! 3! II. First Steps! 4! III. Preferences! 5! Start/Stop! 5! 2. Ports! 6! 3. PHP! 7! 4. Apache! 8! 5. Open Start Page! 8! IV. FAQ! 9! V.
MAMP Documentation! ! I. Installation! ! 1. Installation requirements! ! To use the MAMP, your system must meet the following requirements:! ! • Operating system: Apple OS X 10.6.6 or later! • Mac with 64-Bit CPU from Intel (x84)! • User account that allows to administer the computer (Administrator) ! ! 2. Installing and upgrading! ! Download MAMP from http://www.mamp.info.! Double click on the file MAMP_MAMP_PRO_3.0.pkg in your Downloads folder.
II. First Steps! ! After successful installation you can launch your local servers. Start MAMP and click on the Start Servers button. In the status display in the upper right corner, the launch status of the servers is displayed. If necessary, you will be asked for your administrator password.
The web server (Apache) starts by default on port 8888, the database server (MySQL) on port 8889. When calling your web page in a web browser, you must enter the Apache port at the end of the URL, e.g.
III. Preferences! ! ! 1. Start/Stop! ! ! Start Servers when starting MAMP! The Apache and MySQL services will start automatically when you launch MAMP.! ! Stop Servers when quitting MAMP! The Apache and MySQL services will be stopped automatically when you quit MAMP.! ! Check for MAMP PRO when starting MAMP! You will be prompted whether you want to start MAMP or MAMP Pro when this option is selected.
2. Ports ! Server programs, when addressed via the network, need to be assigned to a certain network port. This way, multiple server programs may run on one server machine. Every service has a default port: The Apache web server typically uses port 80, the MySQL database server utilises port 3306.! ! These ports are configurable. The default configuration for MAMP uses ports 8888 and 8889 . That way, the MAMP servers can run alongside other servers installed on your Mac.
3. PHP! ! ! ! ! Standard Version! Choose whether PHP 5.1.6 or PHP 5.5.9 is used. The available PHP versions depend on the installed version of MAMP.! ! Cache! Caching can speed up the execution of your PHP code. The default caching option is off. OPcache is only available with PHP 5.5.x, eAccelerator only with versions before 5.5.
4. Apache ! Document Root! Click on to select where your html/PHP files and images are stored. This directory is called Document Root. The default Document Root in MAMP is:
/Applications/MAMP/htdocs.! ! ! 5. Open Start Page!
The default MAMP start page provides links to access utilities such as phpMyAdmin, phpInfo, SQLite Manager, phpLiteAdmin, FAQ, and the MAMP Website.! ! The MAMP start page can be changed using Preferences….
IV. FAQ! ! Is it possible to install MAMP on an external drive?! No, MAMP has to be installed on the system drive.! ! Is MAMP compatible with Mac OS X 10.9 (Mavericks)?! Yes, MAMP is indeed compatible with Mac OS X 10.9 (Mavericks).! ! What does MAMP stand for?! The abbreviation "MAMP" stands for: Macintosh, Apache, MySQL and PHP.! ! Where can I download MAMP?! Get the latest version of MAMP from our website www.mamp.info.
! Check the Default Storage Engine of MySQL! ! 1. Open MAMP! 2. Start the servers! 3. Open Terminal.app (/Applications/Utilities)! 4. Enter the following line into the terminal and hit Enter:!
! 5. Hit Enter ! ! cd /Applications/MAMP/Library/bin! ./mysql --host=localhost -u root -proot
! 6. Enter the following line into the MySQL prompt and hit Enter:!
USE information_schema;
! 7. Enter the following line into the MySQL prompt and hit enter:!
SELECT * FROM engines;
! 8.
Set the MySQL Default Storage Engine! ! The MySQL server of MAMP uses the Default Storage Engine MyISAM. If you want to change this, you have to change the configuration file of the MySQL server. With this tutorial we want to show you how to change the Default Storage Engine to InnoDB.!
1. Stop the MAMP Server if it is running.! 2. Use a text editor to create a file named my.cnf and save it to the
/Applications/MAMP/conf/ folder.! 3.
$mysqli = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE); ! if (mysqli_connect_error()) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } ! ! ! ?>! ! ! ! ! ! ! ! ! echo 'Connected successfully.'; $mysqli->close(); All product names and any registered and unregistered trademarks mentioned are used for identification purposes only and remain the exclusive property of their respective owners.