2 ms·
This doesn't seem to be any harder than MySQL, it's just a bit different. Also note that PostgreSQL can perform "peer" auth, so you don't have to fiddle with DB
by vog 11y ago
This doesn't seem to be any harder than MySQL, it's just a bit different. Also note that PostgreSQL can perform "peer" auth, so you don't have to fiddle with DB passwords unless you really want to access your DB over a network.
Install package:
apt-get install postgresql-9.4
Become PostgreSQL admin:
su - postgres
Create a DB user who is allowed to create databases (assuming your app will run as user "someuser"):
createuser -d someuser
Login as that user:
exit
su - someuser
Create your database:
createdb somedb
Play with your database:
psql somedb
CREATE TABLE ...