Skip to content

Instantly share code, notes, and snippets.

@phanect
Last active March 7, 2021 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phanect/4ec766d50bc653454eaba5943484cd85 to your computer and use it in GitHub Desktop.
Save phanect/4ec766d50bc653454eaba5943484cd85 to your computer and use it in GitHub Desktop.
Create database

MySQL:

CREATE DATABASE dbname CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* to username@localhost;

@see http://qiita.com/Vit-Symty/items/159c27d7d62c78ee9ce7

PostgreSQL:

create database dbname TEMPLATE = 'template0' ENCODING = 'UTF8' LC_COLLATE = 'ja_JP.UTF-8' LC_CTYPE = 'ja_JP.UTF-8';

@see:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment