Arquivo da tag: Banco de Dados

Autostart MySQL Server on Mac OS X Yosemite/El Capitan

1) Entre na pasta “/Library/LaunchDaemons”:

2) Procure o arquivo “com.mysql.mysql.plist”, caso não exista crie:

sudo nano com.mysql.mysql.plist

3) Cole dentro do arquivo:

<?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>

4) Depois de salvar o arquivo execute:

sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist

5) Para finalizar:

sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

Link de referência: http://stackoverflow.com/questions/26461173/autostart-mysql-server-on-mac-os-x-yosemite-el-capitan