Using MYSQL with MAMP

mamp window

Step 1: Start MAMP which will display this window. Click on the middle button to bring up the Start Page.

mamp start page

Step 2: The mac and PC version of this page may look different but both have the same link under the MySQL section in the middle. Click on the link for phpMyAdmin.

phpMyAdmin window

Step 3: phpMyAdmin will look like this.

mamp databases tab

Step 4: Click on the databases tab

mac installation start install

Step 5: Type in a database name in the input field, then click the create button. Note: you do not have to do this step if your SQL includes a statement to create the database AND you have correct permissions to create databases on your MySQL server. If this is the case you can skip to Step 8.

mamp selecting database

Step 6: Select the newly created database in the list at the left

mamp import tab

Step 7: Click on the import tab

mamp choose sql file

Step 8: Under Files to Import click Choose file and find the .sql file on your computer.

mamp go button

Step 9: Find the tiny Go button at the bottom of this page.

mamp successful import

Step 10: If things went well you will see something like this for a successful import. If not you will have to read the error carefully and adjust. Often the error is that you haven't selected the database to import to under Step 6.

mamp table structure view

Step 11: If you added tables to your database, you will now see a + next to the database name, denoting there are tables in the databse. Click on that to open the database and see the tables. Then click on a table and the Structure tab to see the table structure view.

mamp table data view

Step 12: Click on a database table and the Browse tab to see the contents of a table

mamp sql dialog box

Step 13: Click on the SQL tab to get a big dialog box where you can enter SQL queries directly.

mamp sql query

Step 14: Type in a SQL query and press the go button.

mamp query results

Step 15: View the results!