I had earlier installed mysql-5.1.50-osx10.6-x86_64.dmg and then uninstalled it using the below belo command (found in stackoverflow)
$ sudo rm /usr/local/mysql
Password:
$ sudo rm -rf /usr/local/mysql*
$ sudo rm -rf /Library/StartupItems/MySQLCOM
$ sudo rm -rf /Library/PreferencePanes/My*
$ rm -rf ~/Library/PreferencePanes/My*
$ sudo rm -rf /Library/Receipts/mysql*
$ sudo rm -rf /Library/Receipts/MySQL*
$ sudo vi /etc/hostconfig
$ sudo rm -rf /var/db/receipts/com.mysql.mysql*
$ cd /Library/Receipts/
Then I have tried to reinstall from mysql-5.5.9-osx10.6-x86_64.dmg.
However I am getting the below error:
The installation failed The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Take a look at the installer log — open the Installer; press command-L to show the log, and command-3 to increase the detail level; attempt the install.
The below is a summary of the comments
OP: The error log displays the below mentioned
Paul: Looks like you don't have a user "mysql". Confirm that by running dscl . list /Users|grep mysql. You should see _mysql as the result.
OP: running
dscl . list /Users|grep mysql
It did not return anythingPaul: Your mysql user is missing. [Here are instructions for creating a MySQL user][1] Do that, and then run the installer
OP: Thanks a lot it worked. I have created the mysql user and the group as suggested by you. The ran the installer. It was installed.