Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have problems to reinstall MySQL on Mac OS X after it was running on my system.

I uninstalled it because the PreferencePane wasn't working as expected, using the procedure described here: http://akrabat.com/computing/uninstalling-mysql-on-mac-os-x-leopard/

When trying to reinstall MySQL 5.5.27-community 64-bit version using the PKG-installer, it says "The installation failed"

Here are the complete logs of the installation:

Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: @(#)PROGRAM:Install  PROJECT:Install-729
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: @(#)PROGRAM:Installer  PROJECT:Installer-614
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Hardware: MacBookPro8,2 @ 2.20 GHz (x 8), 8192 MB RAM
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Running OS Build: Mac OS X 10.8 (12A269)
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: TMPDIR=/var/folders/43/v0s9432n5djcxc3xzgc2jv3c0000gn/T/
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: SHELL=/bin/bash
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: HOME=/Users/kim
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: USER=kim
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: LOGNAME=kim
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: SSH_AUTH_SOCK=/tmp/launch-1yOBFx/Listeners
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: Apple_Ubiquity_Message=/tmp/launch-na8k9v/Apple_Ubiquity_Message
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: Apple_PubSub_Socket_Render=/tmp/launch-Kh2FJp/Render
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: COMMAND_MODE=unix2003
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0:0
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: MySQL 5.5.27-community for Mac OS X  Installation Log
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Opened from: /Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: fileURLForURL = x-disc://mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: fileURLForURL = file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg
Aug  9 15:38:40 Kims-MacBook-Pro.local Installer[991]: Referenced component packages (1) trustLevel=100
Aug  9 15:38:46 Kims-MacBook-Pro.local Installer[991]: InstallerStatusNotifications plugin loaded
Aug  9 15:38:53 Kims-MacBook-Pro.local runner[1000]: Administrator authorization granted.
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: ================================================================================
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: User picked Standard Install
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: Choices selected for installation:
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]:  Install: "MySQL 5.5.27-community for Mac OS X"
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]:      mysql-5.5.27-osx10.6-x86_64.pkg : com.mysql.mysql : 5.5.27.1.0
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: ================================================================================
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: It took 0.00 seconds to summarize the package selections.
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: -[IFPKGDerivedDocument sortedPackageLocations]: result = (
        "file://localhost"
    )
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhost
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: Set authorization level to root for session
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: Will use PK session
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: Starting installation:
Aug  9 15:38:53 Kims-MacBook-Pro.local Installer[991]: Configuring volume "Macintosh HD"
Aug  9 15:38:54 Kims-MacBook-Pro.local Installer[991]: Preparing disk for local booted install.
Aug  9 15:38:54 Kims-MacBook-Pro.local Installer[991]: Free space on "Macintosh HD": 408.7 GB (408696610816 bytes).
Aug  9 15:38:54 Kims-MacBook-Pro.local Installer[991]: Create temporary directory "/var/folders/43/v0s9432n5djcxc3xzgc2jv3c0000gn/T//Install.991CQ7rxj"
Aug  9 15:38:54 Kims-MacBook-Pro.local Installer[991]: IFPKInstallElement (1 packages)
Aug  9 15:38:54 Kims-MacBook-Pro.local Installer[991]: Using authorization level of root for IFPKInstallElement
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: installd: Starting
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: installd: uid=0, euid=0
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: PackageKit: ----- Begin install -----
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: PackageKit: packages=(
        "PKJaguarPackage <file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg>"
    )
Aug  9 15:38:54 Kims-MacBook-Pro.local installd[1003]: PackageKit: Extracting file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandboxManager/1.sandbox/Root/usr/local, uid=0)
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: PackageKit: prevent user idle system sleep
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: PackageKit: suspending backupd
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: PackageKit: Executing script "./preflight" in /Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: ./preflight: 2012-08-09 15:39:05.114 installd[1009:203] *** NSTask: Task create for path '/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg/Contents/Resources/preflight' failed: 22, "Invalid argument".  Terminating temporary process.
Aug  9 15:39:05 Kims-MacBook-Pro.local install_monitor[1008]: Temporarily excluding: /Applications, /Developer, /Library, /System, /bin, /private, /sbin, /usr
Aug  9 15:39:05 Kims-MacBook-Pro.local install_monitor[1008]: Re-included: /Applications, /Developer, /Library, /System, /bin, /private, /sbin, /usr
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: PackageKit: releasing backupd
Aug  9 15:39:05 Kims-MacBook-Pro.local installd[1003]: PackageKit: allow user idle system sleep
Aug  9 15:39:06 Kims-MacBook-Pro.local installd[1003]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “mysql-5.5.27-osx10.6-x86_64.pkg”." UserInfo=0x7fdabc50a6c0 {NSFilePath=./preflight, NSURL=file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg, PKInstallPackageIdentifier=com.mysql.mysql, NSLocalizedDescription=An error occurred while running scripts from the package “mysql-5.5.27-osx10.6-x86_64.pkg”.} {
        NSFilePath = "./preflight";
        NSLocalizedDescription = "An error occurred while running scripts from the package \U201cmysql-5.5.27-osx10.6-x86_64.pkg\U201d.";
        NSURL = "file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg";
        PKInstallPackageIdentifier = "com.mysql.mysql";
    }
Aug  9 15:39:06 Kims-MacBook-Pro.local Installer[991]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “mysql-5.5.27-osx10.6-x86_64.pkg”." UserInfo=0x7f90028bc9e0 {NSFilePath=./preflight, NSURL=file://localhost/Volumes/mysql-5.5.27-osx10.6-x86_64/mysql-5.5.27-osx10.6-x86_64.pkg, PKInstallPackageIdentifier=com.mysql.mysql, NSLocalizedDescription=An error occurred while running scripts from the package “mysql-5.5.27-osx10.6-x86_64.pkg”.}
Aug  9 15:39:07 Kims-MacBook-Pro.local Installer[991]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Aug  9 15:39:07 Kims-MacBook-Pro.local Installer[991]: IFDInstallController 2840140 state = 7
Aug  9 15:39:07 Kims-MacBook-Pro.local Installer[991]: Displaying 'Install Failed' UI.
Aug  9 15:39:07 Kims-MacBook-Pro.local Installer[991]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.

As I see it, the problem is in the script preflight, because it fails with error 22: "Invalid argument". Here is the content of the script in case it helps

#!/bin/sh
#
# preflight - this script will be executed before the MySQL PKG
# installation will be performed.
#
# If this package has been compiled with a prefix ending with "mysql" (e.g.
# /usr/local/mysql or /opt/mysql), it will rename any previously existing
# directory with this name before installing the new package (which includes
# a symlink named "mysql", pointing to the newly installed directory, which
# is named mysql-<version>)
#

PREFIX="/usr/local/mysql"
BASENAME=`basename $PREFIX`

if [ -d $PREFIX -a ! -L $PREFIX -a $BASENAME = "mysql" ] ; then
    mv $PREFIX $PREFIX.bak
fi

The error seems similar to the question posted in Re-install MySql in mac os x 10.6.6 but I have defined a user mysql as described in the answer, and my error is not "./postflight: chown: mysql: Invalid argument" exactly

If anyone knows an answer to this problem, I would be very thankfull.

share|improve this question
    
Why not try to use homebrew to install mysql and some other softwares ? The missing package manager for OS X mxcl.github.com/homebrew –  big-circle Aug 10 '12 at 3:53
    
is that the entire ./preflight code? –  Derek Downey Oct 9 '12 at 13:24
add comment

migrated from stackoverflow.com Aug 10 '12 at 10:50

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.