postgresql - Setting up postgres on VPS for production -
Therefore, I have a pyramid app with a postgrez database on my local machine, to get the data dump in my database Did a pg_dump, which is called pg_dump_2014-04-22 I then pushed this file to git, and pulled a vibration into the VPS to get the file.
Now, I've already installed postgres on my VPS. When I do sudo -u postgres psql on my VPS, I can connect it but there is no relation (naturally).
Both my user names and database names are
postgres .
So, I tried
psql postgres & lt; Pg_dump_2014-04-22 , but this error returns
psql: FATAL: role "root" does not exist .
I also tried to
pg_restore -h localhost -U postgres -d postgres pg_dump_2014-04-22 , and this indicates my password, but then the error < code> pg_restore: [Archiver (db)] Connection happened for database "postgres": FATAL: password authentication failed for user postgrades "
What am I missing here ? <
You must first create a user and database where you can import your dump Want
su postgres
createuser root
createdd yourdb
then import with a dump
psql -d yourdb -f pg_dump_2014-04-22
Comments
Post a Comment