Our popular MySQL Installer for OS X 10.8 Mountain Lion has been upgraded to support OS X 10.9 Mavericks. The installer script is a part of our Mac-Scripts Github repository. More information about the scripts can be found at code.macminivault.com. I updated Mac OS Sierra 10.12.1 to PHP 7.1 and after a reboot i am good! MySQL is running in the System Preferences. Did not need to stop start mySQL. So now my websites (WordPress) and OWNCloud (Cloudsolution 24Tb) is running again for over more than an hour it looks that it is working? In this post we will learn how to How To Install MySQL on Mac OS X. The same procedure can be used for installing MySQL on Mac OS X. How to add MySQL to $PAT. I got same problem on 'macOS 10.12.3' installed 'MySQL Workbench Community (GPL) for Mac OS X version 6.3.8 CE build 1228 (64 bit)'. It's always not responding after working around I found that problem comes from MSQL Workbench is set 'Default Target MySQL Version' wrong version.
Note: This post assumes you followed installing Apache, PHP, and MySQL on Mac OS X El Capitan and have since upgraded to Mac OS X Sierra. If you did not follow the original post, you should follow installing Apache, PHP, and MySQL on Mac OS X Sierra.
PHP Update: Mac OS X Sierra comes pre-installed with PHP version 5.6, however the latest version of PHP is 7.1. After you complete this post, you should upgrade PHP on Mac OS X.
When Mac OS X upgrades it overwrites previous configuration files. However, before doing so it will make backups. The backup files often have a suffix of
previous
or pre-update
. Most of the time, configuring your system after updating Mac OS X is simply a matter of comparing the new and old configurations.This post will look at the differences in Apache, PHP, and MySQL between Mac OS X El Capitan and Mac OS X Sierra.
Updating Apache
Mac OS X El Capitan and Mac OS X Sierra both come with Apache pre-installed. As noted above, your Apache configuration file is overwritten me when you upgrade to Mac OS X Sierra.
There were a few differences in the configuration files. However, since both El Capitan and Sierra run Apache 2.4, you can simply backup the configuration file from Sierra and overwrite it with your El Capitan version.
However, I encourage you to stay up-to-date. As such, you should take the time to update Sierra's Apache configuration. First, create a backup and compare the two configuration files for differences.
Now edit the Apache configuration. Feel free to use TextEdit if you are not familiar with vi.
Uncomment the following line (remove
#
):In addition, uncomment or add any lines you noticed from the
diff
above that may be needed. For example, I uncommented the following lines:Finally, I cleaned up some of the backups that were created during the Mac OS X Sierra upgrade. This will help avoid confusion in the future.
Note: These files were not changed between versions. However, if you changed them, you should compare the files before running the commands.
Restart Apache:
Updating PHP
Mac OS X El Capitan came with PHP version 5.5 pre-installed. This PHP version has reached its end of life. Mac OS X Sierra comes with PHP 5.6 pre-installed. If you added any extensions to PHP you will need to recompile them.
Also, if you changed the core PHP INI file it will have been overwritten when upgrading to Mac OS X Sierra. You can compare the two files by running the following command:
Note: Your file may note be named
/etc/php.ini.default.pre-update
. You can see which PHP core files exist by running ls /etc/php.ini*
.I would encourage you not to change the PHP INI file directly. Instead, you should overwrite PHP configurations in a custom PHP INI file. This will prevent Mac OS X upgrades from overwriting your PHP configuration in the future. To determine the right path to add your custom PHP INI, run the following command:
Updating MySQL
MySQL is not pre-installed with Mac OS X. It is something you downloaded when following the original post. As such, the Mac OS X Sierra upgrade should not have changed your MySQL configuration.
You're good to go.
Find this interesting? Let's continue the conversation on Twitter.
The shell path for a user in macOS or OSX is a set of locations in the filing system whereby the user has permissions to use certain applications, commands and programs without the need to specify the full path to that command or program in the Terminal. This will work in macOS Mojave, Sierra and all older OSX operating systems; El Capitan, Yosemite, Mavericks and Lion.
So instead of running something like this, with a path to the command:
You can just type the command, regardless of where you are in the filing system:
Your shell path is a bunch of absolute paths of the filing system separated by colons :
You can find out whats in your path by launching Terminal in Applications/Utilities and entering:
And the result should be like this…
![Sierra Sierra](/uploads/1/2/6/6/126672272/396634263.jpg)
So this is stating that you can run Unix style applications or commands located in 5 default locations of a certain path in the filing system:
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
These directories are not visible by default in the filing system but you can make them visible.
Adding a Temporary Location
You can add extra locations to your path, in the mysql example above it’s location /usr/local/mysql/bin which is not in the default path, you can add it in Terminal like so:
So here I have copied my existing path and added the new location on the end. Test it by running echo $PATH again in the Terminal.
One of the disadvantages of this is that the new location will only be honored for that particular Terminal session, when a new Terminal window is launched it will have the original default path again.
Adding in a Permanent Location
To make the new pathstick permanently you need to create a .bash_profile file in your home directory and set the path there. This file control various Terminal environment preferences including the path.
Move into home directory
Create the .bash_profile file with a command line editor called nano
Add in the above line which declares the new location /usr/local/mysql/bin as well as the original path declared as $PATH.
Save the file in nano by clicking ‘control’ +’o’ and confirming the name of the file is .bash_profile by hitting return. And the ‘control’+’x’ to exit nano
So now when the Terminal is relaunched or a new window made and you check the the path by
You will get the new path at the front followed by the default path locations, all the time
Free Mac Os Download
Rearranging the default $PATH
Mysql Download Mac Os
If you needed to rearrange the paths in the default $PATH variable, you can just do that and leave off $PATH.
So lets say you want /use/local/bin at the beginning to take precedence you can add the default path like so inside .bash_profile
Mac Os Sierra 10.12 Free Apple Download
And then you can slot in other paths as required.