Skip to content

Instantly share code, notes, and snippets.

@Houdini
Created April 22, 2011 01:37
Show Gist options
  • Select an option

  • Save Houdini/935856 to your computer and use it in GitHub Desktop.

Select an option

Save Houdini/935856 to your computer and use it in GitHub Desktop.
same segmentation error
Last login: Fri Apr 22 05:11:36 on console
~ $ brew info mysql
mysql 5.5.10
http://dev.mysql.com/doc/refman/5.5/en/
Depends on: cmake, readline, pidof
find: /usr/local/Cellar/mysql/5.5.10/data: Permission denied
du: /usr/local/Cellar/mysql/5.5.10/data: Permission denied
/usr/local/Cellar/mysql/5.5.10 (6232 files, 219M)
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
To set up base tables in another folder, or use a differnet user to run
mysqld, view the help for mysqld_install_db:
mysql_install_db --help
and view the MySQL documentation:
* http://dev.mysql.com/doc/refman/5.5/en/mysql-install-db.html
* http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html
To run as, for instance, user "mysql", you may need to `sudo`:
sudo mysql_install_db ...options...
Start mysqld manually with:
mysql.server start
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To launch on startup:
* if this is your first install:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
* if this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
cp /usr/local/Cellar/mysql/5.5.10/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
You may also need to edit the plist to use the correct "UserName".
http://github.com/mxcl/homebrew/commits/master/Library/Formula/mysql.rb
~ $ unset TMPDIR
~ $ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
Installing MySQL system tables...
/usr/local/bin/mysql_install_db: line 428: 7527 Done { echo "use mysql;"; cat $create_system_tables $fill_system_tables; }
7528 Done(141) | eval "$filter_cmd_line"
7529 Segmentation fault: 11 | $mysqld_install_cmd_line > /dev/null
Installation of system tables failed! Examine the logs in
/usr/local/var/mysql for more information.
You can try to start the mysqld daemon with:
shell> /usr/local/Cellar/mysql/5.5.10/bin/mysqld --skip-grant &
and use the command line tool /usr/local/Cellar/mysql/5.5.10/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/local/Cellar/mysql/5.5.10/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /usr/local/var/mysql that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/local/Cellar/mysql/5.5.10/scripts/mysqlbug script!
~ $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment