2007-12-20
■[mac]MacPortsでMySQLアップデートしたらソケットファイルがないって言われた
MacにRailsをゼロからインストールする一番簡単な方法:Kenn's Clairvoyance - CNET JapanでRailsまわりの定期メンテナンス法が紹介されてたので、プロジェクト半ばでしたが果敢に実行。
$ sudo port -d selfupdate $ sudo port upgrade installed $ sudo gem update --system $ sudo gem update
なんかMySQL動かなくなった。
error: ‘Can’t connect to local MySQL server through socket ‘/opt/local/var/run/mysql5/mysqld.sock’ (2)’ Check that mysqld is running and that the socket: ‘/opt/local/var/run/mysql5/mysqld.sock’ exists!
またソケットかよ!と思いつついろいろ調べたところ、単にパーミッションの関係でデーモンが起動してなかったのが原因ぽい。
このページとか参考にしてデーモン起動。
$ sudo /opt/local/lib/mysql5/bin/mysqld_safe $ mysql5 -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.51 Source distribution
あっさり動いた。
あとはlaunchctl書いておくと良いみたい。
$ launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
Rails 2.0.2からはSQLite3が標準らしいし、次から乗り換えてみようかな。
トラックバック - http://d.hatena.ne.jp/drillhands/20071220/1198129897
リンク元
- 3 http://www.blog-headline.jp/life/archives/2007/10/coolpix_p5100.html
- 2 http://209.85.175.104/search?q=cache:zPqKsKrXhO4J:d.hatena.ne.jp/drillhands/20071214/1197624811+aptana+uninstall+mac&hl=ja&ct=clnk&cd=1&gl=jp&client=firefox-a
- 2 http://b.hatena.ne.jp/entry/http://japan.cnet.com/blog/kenn/2007/12/19/entry_25003169/
- 2 http://cgi.search.biglobe.ne.jp/cgi-bin/search_bl_top?q=英単語+辞書 フリーソフト&num=10&start=0
- 2 http://www.google.co.jp/search?hl=ja&q=P5100+画質&btnG=Google+検索&lr=
- 1 http://ada.tumblr.com/
- 1 http://d.hatena.ne.jp/drillhands
- 1 http://d.hatena.ne.jp/jitte/20071215
- 1 http://d.hatena.ne.jp/jitte/searchdiary?word=*[Ruby]
- 1 http://d.hatena.ne.jp/keyword/RadRails
