Last active
April 23, 2020 04:50
-
-
Save tacitphoenix/a237cb60448d76ba0d2770c91c16626b to your computer and use it in GitHub Desktop.
Seed database containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PostgreSQL | |
``` | |
create role postgres with password 'postgres'; | |
alter role postgres with login; | |
create database db_one owner=postgres; | |
grant all privileges on database testdb to postgres; | |
\connect db_one | |
create table person (name varchar, age int); | |
insert into person (name, age) values ("John Doe"); | |
grant all privileges on all tables in schema public to postgres; | |
``` | |
# MySQL | |
``` | |
create user 'mysql'@'localhost' identified by 'mysql'; | |
grant all privileges on *.* to 'mysql'@'localhost' with grant option; | |
create database db_two; | |
use db_two; | |
create table person (name varchar, age int); | |
insert into person (name, age) values ("John Doe"); | |
``` |
seed a mysql database container
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
seed a postgres database container