1

Due to unforeseen circumstances, I was forced to upgrade to OS X 10.11 (El Capitan).

Here, the process I followed was to:

  1. install Yosemite onto an external hard drive;
  2. migrate data from MacBook Pro to external hard drive;
  3. then re-format the MacBook Pro;
  4. install Yosemite onto MacBook Pro;
  5. upgrade the MacBook Pro to El Capitan;
  6. 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.

  • Anything you had in /etc e.g. apache config would have been overridden You should set up so files are elsewhere, Probably easiest to reinstall and reset the config from scratch and your backups – user151019 Apr 12 '16 at 11:21
  • Hi Mark, I have no idea how to do any of that. Do you have some references for me to use? – Wayne Smallman Apr 12 '16 at 11:41
  • @WayneSmallman Which was the previous system version? Yosemite or indeed Mavericks? Did you just upgrade or did you migrate (=import with Migration Assistant) the old system? – klanomath Apr 12 '16 at 14:00
  • Hi @klanomath, I'll provide more information in the opening post. – Wayne Smallman Apr 12 '16 at 14:22
1

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:

  1. Create a soft link:

    sudo ln -s /usr/local/mysql-5.6.14-osx10.7-x86_64 /usr/local/mysql
    
  2. Check the permissions:

    ls -laO /usr/local
    

    The command should reveal:

    ...
    lrwxr-xr-x   1 root  wheel  -  27 13 Apr 00:04 mysql -> mysql-5.6.14-osx10.7-x86_64
    drwxr-xr-x  17 root  wheel  - 578 13 Apr 00:05 mysql-5.6.14-osx10.7-x86_64
    ...
    
  3. Create the file /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist with the following content:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Label</key>             <string>com.oracle.oss.mysql.mysqld</string>
        <key>ProcessType</key>       <string>Interactive</string>
        <key>Disabled</key>          <false/>
        <key>RunAtLoad</key>         <true/>
        <key>KeepAlive</key>         <true/>
        <key>SessionCreate</key>     <true/>
        <key>LaunchOnlyOnce</key>    <false/>
        <key>UserName</key>          <string>_mysql</string>
        <key>GroupName</key>         <string>_mysql</string>
        <key>ExitTimeOut</key>       <integer>600</integer>
        <key>Program</key>           <string>/usr/local/mysql/bin/mysqld</string>
        <key>ProgramArguments</key>
            <array>
                <string>/usr/local/mysql/bin/mysqld</string>
                <string>--user=_mysql</string>
                <string>--basedir=/usr/local/mysql</string>
                <string>--datadir=/usr/local/mysql/data</string>
                <string>--plugin-dir=/usr/local/mysql/lib/plugin</string>
                <string>--log-error=/usr/local/mysql/data/mysqld.local.err</string>
                <string>--pid-file=/usr/local/mysql/data/mysqld.local.pid</string>
                <string>--port=3307</string>
            </array>
        <key>WorkingDirectory</key>  <string>/usr/local/mysql</string>
    </dict>
    </plist>
    

    The file needs a trailing empty line/new line.

    You may replace --port=3307 by --port=3306 depending on your previous configuration.

  4. Change the permissions of the file:

    sudo chown root:wheel /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    sudo chmod 644 /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    
  5. Load the launch daemon with

    sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    

I strongly recommend to update to a newer version of MySQL.


Apache errors:

The error

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

is related with the old Apache config (10.9) file you are using:

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>

In the new Apache config file (10.11) the section looks like this:

    <Directory />
        AllowOverride none
        Require all denied
    </Directory>

I recommend to setup Apache with a 2.4 (included in 10.11) config file.

0

The 'Order' command has been deprecated. It was a holdover from Apache 2.2. You are using Apache 2.4 now. What I suspect happened is that you copied over your .conf files from Apache 2.2 to your new 2.4 installation.

Somewhere in your httpd.conf files under the sections, you have something like this:

Order deny,allow 
Deny from all

What you need to do, is replace it with

Require all denied

Also, ensure that you are loading the modules listed below. Just search your httpd.conf file for the following lines:

  • LoadModule authz_core_module modules/mod_authz_core.so
  • LoadModule authz_host_module modules/mod_authz_host.so

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .