2014年8月3日日曜日

apple公式リンク

realm

http://support.apple.com/kb/HT200248?viewlocale=ja_JP&locale=ja_JP

dav

http://support.apple.com/kb/HT4777?viewlocale=ja_JP

証明書

http://support.apple.com/kb/PH8073?viewlocale=ja_JP

2014年8月2日土曜日

mysql自動起動(再)

osをmarvericksに、server.appをver 3.xにしたらいろいろ動かなくなった。

mysqlでエラーがでる。passengerが動かない。
mysql.sockがない模様。どうしたらいいのか忘れている。

140802 11:13:45  mysqld started
140802 11:13:45 [Warning] Can't create test file /var/mysql/xxxxxx.lower-test
140802 11:13:45 [Warning] Can't create test file /var/mysql/xxxxxx.lower-test
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
140802 11:13:45  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

140802 11:13:45  mysqld ended

権限がないのかなと思っていろいろやったけど

140802 11:48:03  mysqld started
140802 11:48:03 [Warning] Setting lower_case_table_names=2 because file system for /var/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
140802 11:48:03  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
140802 11:48:03  mysqld ended

さしてかわらない。rootでmysq_safeでmysql.sockができるが、別のアカウントだとエラーになる。

diff: /etc/my.cnf: Permission denied
cat: /var/mysql/xxxxxx.jp.pid: Permission denied
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/xxxxxxx.jp.pid
140802 12:48:37  mysqld ended

mysqlを実行すると、エラーになる。mysqlが起動していないからか。ふと、起動時に何か立ち上げてたなと思い出すが、LaunchDaemon、LaunchAgentを見てもない、Sysytemにも、Libraryにも。。。marvericksにしたときに消えたかな。

記述方法を忘れたので再度記載。これで動いた。



<?xml version="1.0" encoding="UTF-8"?>
<lt!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>KeepAlive</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
        <key>Label</key>
        <string>org.mysql</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/usr/bin/mysqld_safe</string>
        <key>UserName</key>
        <string>_mysql</string>
</dict>
</plist>

launchctl


起動時などに何かしたいときは/Library/LaunchDaemonにplistを作っておく。

launchctl load -w xxxx.plist

でOK。

launchctl: no plist was returned for: xxxx.plist
nothing found to load

などのエラーのときは記述ミスなどが疑われるので、

plutil -lint xxxx.plist

でエラーチェックできる

2014年8月1日金曜日

passengerでエラー

Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

my.confとかさわっていない、mysql.sockが見当たらないので、mysqld_safeで起動して、mysql.sockを生成。これで動きました。前もやったけど、ここに書いてなかったのかな、みあたらない

/var/mysql〜