( ! ) Warning: Undefined array key "url" in /code/wp-content/plugins/wpforms-lite/src/Forms/IconChoices.php on line 127
Call Stack
#TimeMemoryFunctionLocation
10.0000355768{main}( ).../index.php:0
20.0001356080require( '/code/wp-blog-header.php ).../index.php:17
30.0001356496require_once( '/code/wp-load.php ).../wp-blog-header.php:13
40.0001357264require_once( '/code/wp-config.php ).../wp-load.php:50
50.0001358696require_once( '/code/wp-settings.php ).../wp-config.php:96
60.01522180664do_action( $hook_name = 'plugins_loaded' ).../wp-settings.php:550
70.01522181040WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:517
80.01522181040WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:348
90.01862511640WPForms\WPForms->objects( '' ).../class-wp-hook.php:324
100.01872523584do_action( $hook_name = 'wpforms_loaded' ).../WPForms.php:266
110.01872523960WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:517
120.01872523960WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:348
130.01972614752WPForms\WPForms->WPForms\{closure:/code/wp-content/plugins/wpforms-lite/src/WPForms.php:299-309}( '' ).../class-wp-hook.php:324
140.01972614880WPForms\Forms\IconChoices->init( ).../WPForms.php:307

( ! ) Warning: Undefined array key "path" in /code/wp-content/plugins/wpforms-lite/src/Forms/IconChoices.php on line 128
Call Stack
#TimeMemoryFunctionLocation
10.0000355768{main}( ).../index.php:0
20.0001356080require( '/code/wp-blog-header.php ).../index.php:17
30.0001356496require_once( '/code/wp-load.php ).../wp-blog-header.php:13
40.0001357264require_once( '/code/wp-config.php ).../wp-load.php:50
50.0001358696require_once( '/code/wp-settings.php ).../wp-config.php:96
60.01522180664do_action( $hook_name = 'plugins_loaded' ).../wp-settings.php:550
70.01522181040WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:517
80.01522181040WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:348
90.01862511640WPForms\WPForms->objects( '' ).../class-wp-hook.php:324
100.01872523584do_action( $hook_name = 'wpforms_loaded' ).../WPForms.php:266
110.01872523960WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:517
120.01872523960WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:348
130.01972614752WPForms\WPForms->WPForms\{closure:/code/wp-content/plugins/wpforms-lite/src/WPForms.php:299-309}( '' ).../class-wp-hook.php:324
140.01972614880WPForms\Forms\IconChoices->init( ).../WPForms.php:307
Creating user, database and adding access on PostgreSQL | Validata Teknologi

NOTE: Right off the bat — this is valid as on March 2017, running on Ubuntu 16.04.2, with PostgreSQL 9.6

TL;DR; version

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;

One nice thing about PGSQL is it comes with some utility binaries like createuser and createdb. So we will be making use of that.

As the default configuration of Postgres is, a user called postgres is made on and the user postgres has full superadmin access to entire PostgreSQL instance running on your OS.

$ sudo -u postgres psql

The above command gets you the psql command line interface in full admin mode.

In the following commands, keep in mind the < angular brackets > are to denote variables you have to set yourself. In the actual command, omit the <>

Creating user

$ sudo -u postgres createuser <username>

Creating Database

$ sudo -u postgres createdb <dbname>

Giving the user a password

$ sudo -u postgres psql
psql=# alter user <username> with encrypted password '<password>';

Granting privileges on database

psql=# grant all privileges on database <dbname> to <username> ;

And yeah, that should be pretty much it !

Doing purely via psql

Your OS might not have the createuser or createdb binaries, or you may, for some reason want to do it purely via psql, then these are the three magic commands —

CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;

Obligatory shameless self-plug :
I am one of the co-founders of Coding Blocks — A Software Programming bootcamp, based out of New Delhi, India. Among other things, we teach Full Stack Web Development using NodeJS, via both classroom programmes, as well as online classes. You can follow our Medium to find more articles on Android and Web development.

Get in touch with us

If you have an unanswered question please do not hesitate to contact us. Submitting this form is the quickes way to get your concern answered

Contact Us

Phone

+62 22 7530 760

Email

info@rekateknologi.net

Address

Jln.  Summarecon Bandung, Magna Commercial Blok MC 65, Rancabolang

OUR PRODUCT