Skip to content

Launch a MySQL database locally

Goal:

Set up the MySQL environment directly on a personal computer or workstation.

Requirements:

  • OS: Linux or Mac/OSx
  • Python 3.5 or higher (either system-level, or in an IDE)
  • 400 MB free disk space
  • Permission to perform sudo-level commands

Steps:

  1. Install and set-up the DataJoint docker container
  2. Download and launch the DataJoint MySQL server via docker-compose

Refer to the FAQ if issues arise.


1. Install and set-up the DataJoint docker container

  • Install the correct Docker for your OS.
  • Verify the Docker installation:
docker --version
docker run hello-world
docker-compose --version

2. Download and launch the DataJoint MySQL server via docker-compose

Following is taken from DataJoint documentation.

  • Create a directory to store the docker-compose YAML file:
mkdir mysql-docker
cd mysql-docker
wget https://raw.githubusercontent.com/datajoint/mysql-docker/master/docker-compose.yaml
docker compose up -d
  • Download a package that enables access to your locally running MySQL server:

Linux:

sudo apt-get install mysql-client

Mac (via Homebrew):

brew install mysql@5.7
brew tap homebrew/services
brew services start mysql@5.7
brew services list
brew link --force mysql@5.7
mysql -V # verify the installation
  • Test the server access. If there are issues, refer here.
mysql -h 127.0.0.1 -u root -p
Enter password: [type in your password here: default is "simple"]

Continue to Install Epiphyte.