Homebrew

From Fishbowl
Jump to navigation Jump to search
Homebrew.png

The first time that Fishbowl 2017.1 or greater is installed on a Mac, MySQL will need to be installed. As an alternative to the MySQL installer, MySQL can also be installed using Terminal and a package manager called Homebrew.

Follow the instructions below to install MySQL using Homebrew. For those not comfortable with a command-line interface, click here.

  1. Open a web browser and type www.brew.sh in the address bar.
  2. Copy the text at the top of the webpage and run it in the Terminal application.
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Enter your Mac user password when requested and complete the installation.
  4. Type the following command in a new Terminal window.
    brew install mysql@5.7
  5. Run the following command.
    brew link mysql@5.7 --force
  6. To set the root password, start the MySQL service by typing the following command.
    brew services start mysql@5.7
  7. Run the following command.
    mysql_secure_installation
  8. Follow the instructions to create a new password and make changes to the server. This command can also be used to reset the root password if you know the current password.
    • Validate complex password? - Optional
    • Remove Anonymous Users? - Yes
    • Disallow root login remotely? - Optional
    • Remove test database? - Optional
    • Reload privilege tables now? - Yes
  9. MySQLWorkbench is an optional tool for viewing the database. It can be installed with the following command.
    brew install Caskroom/cask/mysqlworkbench
  10. The default path for the MySQL install will be /usr/local/Cellar/mysql/5.7.25 (or the current version number)
  11. Download and install Fishbowl.
  12. Stop the MySQL service by typing the following command in Terminal.
    brew services stop mysql@5.7
  13. Copy the my.cnf file from Applications/Fishbowl/server/bin/my.cnf
  14. Open Finder and press command + shift + g (Go menu > Go to Folder). Type /etc and then click Go. Paste the my.cnf file that was copied in the previous step.
  15. Right-click the /etc/my.cnf file, click Get Info, and verify that the permissions are Read Only for everything but System.
  16. Set the permissions for the Fishbowl folder as outlined here.
  17. Open Applications/Fishbowl/server/bin/eve.properties and add the following line (updating the current version number as needed).
    macMySqlPath=/usr/local/Cellar/mysql@5.7/5.7.25
  18. Restart MySQL by running the following command in Terminal.
    brew services restart mysql@5.7
  19. Start Fishbowl using the shortcuts created on the desktop. Fishbowl can also be opened with Applications/Fishbowl/server/bin/Fishbowl Server and Applications/Fishbowl/client/bin/Fishbowl Client.
  20. Follow these steps to create a new MySQL database or migrate a Firebird database.

Below are some additional Terminal commands that may be helpful.

brew services start mysql@5.7
brew services stop mysql@5.7
brew services restart mysql@5.7
mysql --help