Mac Xampp Phpmyadmin

This is a short introduction to help you setup and test access to your database using a local web server (XAMPP). For more information on SQL commands, please refer to database textbook(s).
(Please tell me if you find any errors or omissions in the document —Upsorn Praphamontripong, 9-August-2020)

Yes, I tried XAMPP first and it was not compatible with the New MacBook Pro M1. But I believe they will correct that soon. I also tried MAMP, luckily it works great with the new M1 chip. Along with it, PHP, MySQL, phpMyAdmin also works great. I used VS code on the new M1. It was a bit slow to start the app, but after start it works fine. XAMPP is a software package which is a bundle of apache, mysql and ftp package. You always need to use it when you develop php + mysql application. It is easy to use on Windows, but when i use it on Mac OS, i meet some errors, this article will tell you how to install, start, stop XAMPP on Mac OS and fix all these errors.

XAMPP is an open source package that is widely used for PHP development. XAMPP contains MariaDB, PHP, and Perl; it provides a graphical interface for SQL (phpMyAdmin), making it easy to maintain data in a relational database.

  1. XAMPP Control Panel tries to open the Apache and phpMyAdmin pages at which is using http port 80. After changing Apache http port from 80 to 8080, Apache and phpMyAdmin can no longer be opened on port 80. So by clicking on 'Admin' button on the XAMPP Control Panel, Apache and phpMyAdmin pages will not open.
  2. Xampp phpmyadmin access forbiden. Problems with the Mac OS X version of XAMPP, questions, comments, and anything related. 11 posts. Page 1 of 1. Xampp phpmyadmin access forbiden. By KimenKroi » 23. April 2020 23:36.

If you have not installed XAMPP, please refer to XAMPP-setup to install and set up XAMPP.

Assuming that you have already set up XAMPP

  • Start the database server ('MySQL Database')
  • Start the PHP environment ('Apache Web Server')

Note: phpMyAdmin runs on a PHP environment.To use phpMyAdmin to manage databases, Apache Web server must be started.

Reminder: be sure to stop the server when you are done. Leaving the servers runningconsumes energy and may later prevent the servers from starting (in particular, MySQL server).

Access phpMyAdmin

  1. Open a web browser, enter a URL http://localhost to access XAMPP dashboard
  2. Select phpMyAdmin tab

Alternatively, you may access phpMyAdmin via the XAMPP manager / controller, click Go to Application button to access XAMPP dashboard.

The main page should look similar to the following

Add a user account

  1. On the phpMyAdmin screen, select User accounts tab.
  2. Select Add user account link.
  3. Enter user name and password of your choice. Note: do not use any of your official accounts such as UVA account.
  4. Select Local for Host name
  5. Check Create database with same name and grant all privileges
  6. Check Grant all privileges on wildcard name (username_%)
  7. Check Check all for Global privileges
  8. At the bottom-right of the screen. click the Go button

Do not change or update the root account. If you may forget or need to reset your password, you can use the root account to manage users.

To verify that the account has been created, go to User accounts tab. You should see the newly created user account (as shown below).

Create a database

Let's create a guestbook database. To create a database, there are several options.

You may use the Create database feature.
  • On the phpMyAdmin screen, select the Databases tab. Alternatively, you may click the New link on the left panel.
  • Under the Create database, enter a Database name
  • Click the Create button

You may run the SQL command to create a database.
  • On the phpMyAdmin screen, select the SQL tab
  • Enter CREATE DATABASE guestbook;
    Note: SQL commands are not case sensitive. This example uses uppercase and lowercase simply to make it easy to read.
  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run

Create a table

Let's create a table named entries. To create a table, there are several options.

You may use the Create tableDownload feature.
  • On the phpMyAdmin screen, select the guestbook database.
  • Select the Structure tab.
  • Under the Create table, enter a table name and the number of columns.
  • Click the Go button. This will prompt you to enter the column information.

You may run the SQL command to create a table.
  • On the phpMyAdmin screen, select the SQL tab
  • Enter the following code

    If you already selected the guestbook database (on the left panel), no need to include USE guestbook in your SQL to run.

  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run

Insert data

To insert data into a table, there are several options.

You may use the Insert feature.
  • On the phpMyAdmin screen, select the guestbook database, select the entries table.
  • Select the Insert tab.
  • For each record of data to be inserted, enter the value for each column.
  • Click the Go button.

You may run the SQL command to insert data.
  • On the phpMyAdmin screen, select the guestbook database, select the entries table.
  • Select the SQL tab
  • Enter the following code
  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run

Retrieve data

To retrieve data from a table, there are several options.

You may use the Browse feature.
  • On the phpMyAdmin screen, select the guestbook database, select the entries table.
  • Select the Browse tab. This will display all existing records of the table.

You may run the SQL command to retrieve data.

Xampp Mac Phpmyadmin Config

  • On the phpMyAdmin screen, select the guestbook database, select the entries table.
  • Select the SQL tab
  • Enter the following code
  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run

Import SQL file

  • Create a blank file named friendbook.sql. Paste the following content in the file
  • On the phpMyAdmin screen, select the guestbook database
  • Select the Import tab
  • Choose the .sql file to import
  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run

Mac Xampp Phpmyadmin Tutorial

Export SQL file (back up your database)

Xampp For Mac Os

  • On the phpMyAdmin screen, select the guestbook database
  • Select the Export tab
  • Click the Go button to run the command.
    • For Mac users, you may press Control+Enter to run
    • For Windows users, you may press Command+Enter to run