Skip to content

Instantly share code, notes, and snippets.

@rorens05
Last active March 17, 2022 02:31
Show Gist options
  • Save rorens05/909c96be5381b31ad40a80feb06970dd to your computer and use it in GitHub Desktop.
Save rorens05/909c96be5381b31ad40a80feb06970dd to your computer and use it in GitHub Desktop.
# Ubuntu installation
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
# Mac installation
brew install mysql
brew install openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
# mac m1 additional command
gem install mysql2 -v '0.5.3' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/Cellar/zstd/1.5.0/lib
# Configuration
sudo mysql
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
FLUSH PRIVILEGES
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u username -p mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment