Developer Blog

Tipps und Tricks für Entwickler und IT-Interessierte

MySQL | Getting started

Install

Server

brew install mysql

Prepare

Create Data Directory

mysqld --verbose --initialize --datadir .\data --basedir D:\CLOUD\Environments\MySQL\8.0.22

Start Server

 mysqld --console --datadir .\data --basedir D:\CLOUD\Environments\MySQL\8.0.22

Create Adminuser with password

Change file D:\TMP\init_root.sql with the following content

ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';

Run

mysqld --console --init-file D:\TMP\init_root.sql --datadir .\data --basedir D:\CLOUD\Environments\MySQL\8.0.22

PostgreSQL | Getting started

Install

PostgreSQL Server

Mac OS

brew install postgres

Windows (Installer)

Windows (Zip-ARchiv)

Download postgresql from https://www.enterprisedb.com/download-postgresql-binaries

Configure

Initialize database:

initdb.exe -D ../data –-username=postgres –-auth=trust

Start the database:

pg_ctl.exe start -D ../data

Log into the database:

psql –-username=postgres

Create a password for your user:

ALTER USER postgres WITH PASSWORD ‘VeryVerySecret’;

Install adminpack extension:

CREATE EXTENSION adminpack;

Manage Users

Preparation

psql postgres

List all Users

postgres=# \du+

Create Superuser

 create role superuser superuser login password 'pAssw8rd';

Change Password

Postgres Utilities

Documentation

Working with