Skip to content

Instantly share code, notes, and snippets.

@raineorshine
Last active November 12, 2021 17:22
Show Gist options
  • Save raineorshine/d5a4e6414050c873cbc869fd2823fffc to your computer and use it in GitHub Desktop.
Save raineorshine/d5a4e6414050c873cbc869fd2823fffc to your computer and use it in GitHub Desktop.
Installing MySQL is the worst

Installing MySQL is the worst

Install

Use MariaDB.

MySQL community edition had permissons issued with mysqld.

brew update
brew install mariadb

Start

mysql.server start

Console

mysql

Check if MySQL is running

Default port is 3306.

lsof -i -n -P | grep mariadb
netstat -aln | grep 3306

Create new user with full access

CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL ON my_db.* TO 'new_user'@'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment