2
I installed Mysql 5.5 using Homebrew, specifically Homebrew versions - https://github.com/Homebrew/homebrew-versions. After the installation, I attempted to run the commands it suggests:
Set up databases to run AS YOUR USER ACCOUNT with:
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
...
However, the second line causes an error. When I run:
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
I get the following error:
FATAL ERROR: Could not find my_print_defaults
The following directories were searched:
/usr/local/Cellar/mysql/5.6.10/bin
/usr/local/Cellar/mysql/5.6.10/extra
Perhaps this is because the script is by default searching for files in my old mysql 5.6 directory even though I ran "brew uninstall mysql" before doing this.
Still, if I specify the new mysql installation directory, I still get an error:
$ mysql_install_db --verbose --user=`whoami` --basedir="$/usr/local/Cellar/mysql55/5.5.30" --datadir=/usr/local/var/mysql --tmpdir=/tmp
FATAL ERROR: Could not find my_print_defaults
The following directories were searched:
$/usr/local/Cellar/mysql55/5.5.30/bin
$/usr/local/Cellar/mysql55/5.5.30/extra
This is strange because the first directory indeed does contain my_print_defaults if I ls the directory.
Why, then, am I still getting this error?
I fixed this by uninstalling it with Homebrew and reinstalling it with a package - http://dev.mysql.com/downloads/mysql/5.5.html#downloads
– Eric Baldwin – 2013-06-13T23:59:02.827