Skip to content

Instantly share code, notes, and snippets.

@devjoca
Last active January 15, 2020 15:28
Show Gist options
  • Save devjoca/786fd4bdc7e980511a843b73ee716cd1 to your computer and use it in GitHub Desktop.
Save devjoca/786fd4bdc7e980511a843b73ee716cd1 to your computer and use it in GitHub Desktop.

Database setup

create database db_name charset utf8mb4;
create user db_user@localhost identified by 'db_password';
grant all privileges on db_name.* to db_user@localhost;
flush privileges;

For RDS

Be careful with localhost, when you are creating in a RDS instance and you don't wan't to set an specific client IP you should use the next statement

create database db_name charset utf8mb4;
create user 'db_user'@'%' identified by 'db_password';
grant all privileges on db_name.* to 'db_user'@'%';
flush privileges;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment