How to set up Apache, PHP & MySQL on Mac OS X 10.11 El Capitan & OS X 10.10 Yosemite
Danilo Stern-Sapad
2612

Sorry to disapoint, but I followed all the …

Put this text at the top of the document to set the path to MySQL:

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

Save and close php.ini.

Then type:

source ~/.bash_profile

Now from the MySQL preference pane in System Preferences click Start MySQL Server.

This last step isn’t necessary for a dev environment but if you want to easily secure MySQL execute this command in Terminal:

mysql_secure_installation

steps and those before, and the MySQL server doesn’t even appear on the System Preferences nor in the Application folder. My computer is pretty recent and I am running El Capitan.

Issuing the command line

mysql_secure_installation

and providing root password gives me

MacBook-Pro:apache2 luizcosta$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:

Error: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

For what’s worse, from my recollection, this is the first time I “install” something on the Mac that I have to Install (*.pkg file) using an *.dmg every single time I need to work with it.

Show your support

Clapping shows how much you appreciated luizcosta’s story.