Skip navigation

What is the default database location of os x server 10.6.8

1275 Views 10 Replies Latest reply: Mar 6, 2012 1:30 AM by Kann RSS
Kann Level 1 Level 1 (0 points)
Currently Being Moderated
Feb 29, 2012 3:48 AM

A guy at work just mistakenly change the database location of our OS X 10.6.8 server via Server Admin Tools. Now the Wordpress website that is hosted on this machine stops working because MySQL is messed up. I need to change the settings back to the previous default database location before tracing all the mistakes and errors.


Is the database location of Mac OS X 10.6.8 the same as other Linux variants? Is it /var/mysql?


Would anyone check the settings in Server Admin Tools for me?


Thanks a bunch in advance.

Mac Pro, Mac OS X (10.6.7)
  • MrHoffman Level 6 Level 6 (11,710 points)

    The default location for MySQL data is /var/mysql on Snow Leopard Server.


    Make a disk backup before making additional changes here; boot the Snow Leopard Server DVD, and copy out the current configuration.  This on the off chance that the server or database configuration is more damaged than it might initially appear.

  • MrHoffman Level 6 Level 6 (11,710 points)

    Here is some background on one of the wrinkles with the mysql.sock file on some of the 10.6 versions, and a MySQL test.


    Though you may have checked this, does the following show a MySQL daemon lurking somewhere:


    $ ps -Al | grep -i "mysqld"


    And FWIW, also check the php.ini file for other collateral damage here, as changes made to MySQL can also involve the php configuration file.  (Those changes won't trigger this error, but it'll trigger other ones.)


    The above assumes you don't have a backup made before the changes.

  • MrHoffman Level 6 Level 6 (11,710 points)

    Depending on the changes beyond the directory setting that might have been introduced here, the MySQL configuration may well be seriously messed up, and you may be headed for a roll-in from backups or a reinstallation.


    That grep command shows no mysqld daemon was running.


    Dig around over at Oracle's MySQL web site for details on the startup errors and related processing.


    Also see if there's a second, separate MySQL installed; I've seen that happen at a few sites.

  • MrHoffman Level 6 Level 6 (11,710 points)

    Not having mysqld running does not mean there isn't a parallel MySQL installed. 


    If there's another mysqld around, this:


    $ mdfind "kMDItemDisplayName=='mysqld'"


    will usually find it.


    Why you're getting that error on that file, I don't know; it arises occasionally with MySQL, and there can be different triggers for it.  That's why I suggested the Oracle MySQL web site.


    Do you have database and web-facing backups?  If so, I'd consider making a disk backup of the current disk contents (for anything that was missed from the most recent backups) and then restore the box from distro and restore the databases.  


    Prior to that full restoration (but still after getting a full-disk backup), your idea of a different directory is quite reasonable; I might well restore a mysqldump SQL file as part of that testing.


More Like This

  • Retrieving data ...

Bookmarked By (1)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.