Freebsd postgresql: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 3: Zeile 3:
 
=Enable=
 
=Enable=
 
*sysrc postgresql_enable="YES"
 
*sysrc postgresql_enable="YES"
 
 
=Initdb=
 
=Initdb=
 
*service postgresql initdb
 
*service postgresql initdb
Zeile 12: Zeile 11:
 
*createuser -P user_test
 
*createuser -P user_test
 
*createdb db_test -O user_test
 
*createdb db_test -O user_test
 
=Set more security=
 
*mysql_secure_installation
 
=Login=
 
*mysql -p
 
<pre>
 
Enter password:
 
Welcome to the MySQL monitor.  Commands end with ; or \g.
 
Your MySQL connection id is 15
 
Server version: 5.6.37 Source distribution
 
</pre>
 
 
 
 
=Links=
 
=Links=
 
*https://cwharton.com/blog/2016/10/postgresql-and-freebsd-quick-start/
 
*https://cwharton.com/blog/2016/10/postgresql-and-freebsd-quick-start/

Aktuelle Version vom 31. Oktober 2017, 22:25 Uhr

Install

  • pkg install -y postgresql96-server

Enable

  • sysrc postgresql_enable="YES"

Initdb

  • service postgresql initdb

Start

  • service postgresql start

Create a user and a database

  • su postgres
  • createuser -P user_test
  • createdb db_test -O user_test

Links