Nav Aulakh's Blog


Create a new Postgresql database

July 27, 2017

CREATE DATABASE name
    [ [ WITH ] [ OWNER [=] user_name ]
           [ TEMPLATE [=] template ]
           [ ENCODING [=] encoding ]
           [ LC_COLLATE [=] lc_collate ]
           [ LC_CTYPE [=] lc_ctype ]
           [ TABLESPACE [=] tablespace ]
           [ CONNECTION LIMIT [=] connlimit ] ]

Example:

CREATE DATABASE name WITH OWNER username ENCODING utf8;

Create a new MySQL database

June 15, 2017

CREATE DATABASE `my-db` CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Removed files from repository based on .gitignore

June 14, 2017

git rm --cached `git ls-files -i -X .gitignore`

Create a new MySQL user

June 4, 2017

CREATE USER 'nav'@'localhost' IDENTIFIED BY 's3kr1t';
CREATE USER 'nav'@'%' IDENTIFIED BY 's3kr1t';

GRANT ALL ON *.* TO 'nav'@'localhost';
GRANT ALL ON *.* TO 'nav'@'%';

FLUSH PRIVILEGES;

Categories