Getting Started with MySQL and PHP

This is going to be a tutorial in MySQL and PHP. I will respond to questions in the comments below. Let’s assume you have a computer. I have a computer also. Mine is a PC, but I’ve turned it into a Mac by following these simple steps:

Great, now that you have a Mac, let’s get started…

Ok, so if you couldn’t tell I was joking about how simple it is to set up a Hackintosh. It’s not that easy at all and maybe its grounds for a whole new tutorial, however I believe that tonymacx86.com has taken care of that pretty well.

I will likely rely throughout this site on Homebrew. Let’s install Homebrew.

https://brew.sh/

Great, now that you have Homebrew, let’s install MySQL.

brew install mysql

Now, kick off your freshly installed MySQL server.

mysql.server start

Let’s say you have MacOS and you want PHP installed, lets not rely on the built in PHP server, instead, let’s do:

brew install php

I won’t go back and forth between Windows and Mac for all commands, but here is a resource info you use Windows: http://www.wampserver.com/en/.

And so yes, you need an actual web server. You see, PHP is just the scripting language that gets executed by a PHP interpreter. The web server is what actually serves the pages. What will we use? You guess it, Apache.

brew install httpd
sudo apachectl start

Open up your favorite browser https://www.google.com/chrome/

Go to: http://localhost:8080

Apache’s default landing page

Next time we will continue with getting your first PHP page up and running.

Aaron Pfoltzer

View Comments

    Share
    Published by
    Aaron Pfoltzer

    Recent Posts

    How to Run Roon Client in Linux

    You may have been searching on how to run Roon Desktop client in Linux. You…

    2 years ago

    My Home Office Studio and Server Area

    I've got quite the home office studio and server area setup in this area of…

    2 years ago

    Gentoo Linux – Not just for the bored.

    Although I initially switched over to Gentoo Linux from macOS Big Sur (OpenCore Hackintosh) on…

    2 years ago

    Easy Backups With IDrive

    Let's take a look at how you can have easy backups with IDrive from Mac,…

    2 years ago

    This is how to EQ Your Voice for YouTube

    EQ voice for YouTube using this tutorial as a guide. I will go over my…

    2 years ago

    Does Upgrading My Power Amp Make Any Difference?

    Upgrading your power amp can really make a difference but then again things such as…

    2 years ago

    This website uses cookies.