How To Install PHP MySQL & Apache on MacOS Ventura on MacBook Pro M1

In my previous post, I was unable to install PHP & MySQL. This time after 2 years, I tried again but still fail, so I decided to use XAMPP to install PHP & MySQL and Apache on MacOS Ventura and it works!

But I had to disable default installed apache2 and change MySQL default port at XAMPP before MySQL and Apache2 can run on XAMPP.

How To Install PHP, MySQL & Apache using XAMPP

1. Download and install XAMPP

Mount the xampp dmg and run it. If you face unknown publish then do Control + Click on the XAMPP installer then run it again.

2. Follow the step by step instruction in installing XAMPP

Just follow the instructions.

3. Run the servers

If you unable to run the MySQL & Apache web server than follow below solution.

xampp macos ventura - mysql and apache webserver unable to start
xampp macos ventura – mysql and apache webserver unable to start

If you can run MySQL change it default ports. I use 3316 instead of default 3306.

xampp macos ventura - change the default port to 3316
xampp macos ventura – change the default port to 3316

I tried to stop mysql service but MacOS informed no MySQL service was running. Only by changing MySQL default port it works.

xampp macos ventura - mysql not running
xampp macos ventura – mysql not running

If you can’t run the apache2 server, stop default apache2 server by typing at the terminal.

Then run again Apache Web Server at XAMPP.

xamp macos ventura - apache webserver now running
xamp macos ventura – apache webserver now running

4. Test PHP & MySQL by accessing PhpMyAdmin

If you can access phpMyAdmin and create table or user from phpMyAdmin then your XAMPP installation works!

xampp macos ventura - access localhost and click phpmyadmin
xampp macos ventura – access localhost and click phpmyadmin
xamp macos ventura - successful installed php and mysql now can access phpmyadmin
xamp macos ventura – successful installed php and mysql now can access phpmyadmin