LoginSignup
3
1

More than 5 years have passed since last update.

Mysql・PostgreSQLをDockerコマンド1行で使う

Posted at

はじめに

データベースの環境構築が面倒なためDockerでとりあえずやる時のコマンドメモです。

Mysqlの実行コマンド

ルートパスワード: mysql

docker run --restart=always --name mysql -e MYSQL_ROOT_PASSWORD=mysql -d -p 3306:3306 mysql

PostgreSQLの実行コマンド

初期ユーザ: postgres
初期パスワード: postgres

docker run --restart=always -d --name=postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres postgres
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1