Due to unforeseen circumstances, I was forced to upgrade to OS X 10.11 (El Capitan).
Here, the process I followed was to:
- install Yosemite onto an external hard drive;
- migrate data from MacBook Pro to external hard drive;
- then re-format the MacBook Pro;
- install Yosemite onto MacBook Pro;
- upgrade the MacBook Pro to El Capitan;
- and migrate the data from external hard drive to MacBook Pro.
During the migration, I've managed to keep the databases for MySQL, and it appears to be the same version I had with Mavericks (mysql-5.6.14-osx10.7-x86_64).
However, when I go to the Preference Pane for MySQL in the System Preferences, I'm told "The MySQL server instance is not running" and the start button is disabled.
I've done various searches and either the suggestions don't seem to match the specific problem I'm having, or I'm not confident enough to try them in case I make things worse.
I've had a look in the "my.cnf" file and the settings are commented out and have blank values (a series of placeholder dots).
Also, the alias to the MySQL folder "mysql" is gone.
In addition to this, I'm having problems with the web server itself.
I followed the advice in a StackOverflow answer, and while it stopped some of the errors, when I run "apachectl configtest" from the Terminal, I get:
AH00526: Syntax error on line 183 of /private/etc/apache2/httpd.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Needless to say I'm not that proficient on the command line.
At this stage, I have zero idea what's going on.
Edit 1
I made a backup of both "httpd.conf" and "extras/httpd-mpm.conf" while following the errors reported by "apachectl configtest", in each instance commenting out the offending lines instead of deleting them.
But after I ended up with:
"AH00526: Syntax error on line 25 of /private/etc/apache2/extra/httpd-autoindex.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration"
… I gave up.
Best Answer
MySQL-5.6.14 was installed with a StartUpItem which is necessary to automatically start MySQL while booting. StartUpItems are deprecated meanwhile (and probably wasn't migrated therefore) and launch daemons are used instead.
To get your MySQL back do the following:
Create a soft link:
Check the permissions:
The command should reveal:
Create the file /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist with the following content:
The file needs a trailing empty line/new line.
You may replace --port=3307 by --port=3306 depending on your previous configuration.
Change the permissions of the file:
Load the launch daemon with
I strongly recommend to update to a newer version of MySQL.
Apache errors:
The error
is related with the old Apache config (10.9) file you are using:
In the new Apache config file (10.11) the section looks like this:
I recommend to setup Apache with a 2.4 (included in 10.11) config file.