› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
Livid
396.81D
544.5D
V2EX  ›  MySQL

修复 MySQL 在 Yosemite 上的自动启动

  •  
  •   Livid ·
    PRO
    · Dec 19, 2014 · 4716 views
    This topic created in 4303 days ago, the information mentioned may be changed or developed.

    升级到 Yosemite 之后,之前安装的 MySQL StartupItem 貌似就失效了。

    一个解决方式是自己创建一个 launchd 脚本解决。

    sudo vi /Library/LaunchDaemons/com.mysql.mysql.plist
    

    内容是:

    <?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>
        <true />
        <key>Label</key>
        <string>com.mysql.mysqld</string>
        <key>ProgramArguments</key>
        <array>
          <string>/usr/local/mysql/bin/mysqld_safe</string>
          <string>--user=mysql</string>
        </array>
      </dict>
    </plist>
    

    然后加载这个 launchd 脚本。

    sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist 
    sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist 
    sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
    
    1 replies  •  2014-12-20 23:14:39 +08:00
    ibigbug
        1
    ibigbug  
       Dec 20, 2014
    其实我觉得 launchctl 好难用。何不直接用 supervisor 来管理?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   891 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:37 · PVG 05:37 · LAX 14:37 · JFK 17:37
    ♥ Do have faith in what you're doing.