我正在與MAMP包中包含的SQL服務器一起工作。我想設置我的電腦,以便SQL服務器在我啓動時自動啓動。有誰知道最簡單的方法來做到這一點?如何在系統啓動時自動啓動MAMP sql server
很多,很多的感謝,
D.
UPDATE
當我嘗試使用Macmade建議LaunchDaemon文件,下面,我得到以下錯誤:
110906 19:52:05 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
110906 19:52:05 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case in$
110906 19:52:05 [Note] Plugin 'FEDERATED' is disabled.
^G/Applications/MAMP/Library/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110906 19:52:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110906 19:52:05 InnoDB: The InnoDB memory heap is disabled
110906 19:52:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
110906 19:52:05 InnoDB: Compressed tables use zlib 1.2.3
110906 19:52:05 InnoDB: Initializing buffer pool, size = 128.0M
110906 19:52:05 InnoDB: Completed initialization of buffer pool
110906 19:52:05 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.
110906 19:52:05 mysqld_safe mysqld from pid file /Applications/MAMP/db/mysql/Doyuen-Kos-Mac-Pro.local.pid ended
在此之後,我查找了一些MAMP目錄,並找到了一個名爲startMysql.sh的腳本。當我從命令行運行它時,它會啓動sql服務器。完善。如果沒有可能的話,我也嘗試將它放入LaunchDaemon文件中。
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<false/>
<key>Label</key>
<string>mysql</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/MAMP/bin/start.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
這也沒有工作。另外,奇怪的是,它似乎沒有在控制檯應用程序中產生任何類型的消息。
我仍然卡住了。有人有主意嗎?
Macmade,謝謝*很*的答案。不幸的是,這並不奏效(請參閱上面的編輯)。任何其他想法? –