After installation, in order to use mysql commands without typing the full path to the commands you need to add the mysql directory to your shell path, (optional step) this is done in your “.bash_profile” file in your home directory, if you don’t have that file just create it using vi or nano: The first command brings you to your home directory and opens the .bash_profile file or creates a new one if it doesn’t exist, then add in the line above which adds the mysql binary path to commands that you can run.Exit the file with type “control x” and when prompted save the change by typing “y”.
This tutorial will go through the process on getting Apache, My SQL, PHP (or otherwise known as the ‘AMP’ stack) and php My Admin running on the new mac OS Sierra.Launch Terminal, (Applications/Utilities), and follow the commands below, first one gets you to the right spot, 2nd one cracks open the text editor on the command line (swap ‘username‘ with your account’s shortname, if you don’t know your account shortname type ‘ Then this user level document root will be viewable at: You should only see a directory tree like structure if the folder is empty.If you are going to use the web serving at /Library/Web Server/Documents it is a good idea to allow any .htaccess files used to override the default settings – this can be accomplished by editing the file at line 217 and setting the Allow Override to All and then restart Apache.To run a website with no permission issues it is best to set the web root and its contents to be writeable by all, since it’s a local development it shouldn’t be a security issue.Lets say that you have a site in the User Sites folder at the following location ~/Sites/testsite you would set it to be writeable like so: If you are concerned about security then instead of making it world writeable you can set the owner to be Apache _www but when working on files you would have to authenticate more as admin you are “not” the owner, you would do this like so: This will set the contents recursively to be owned by the Apache user.