openpim / server

Apache License 2.0
58 stars 24 forks source link

Installation issue #1

Closed OrderedWEB closed 3 years ago

OrderedWEB commented 3 years ago

The init.sql file used to initalise the postgre database for openPIM apprears to have SQL errors in it (acording to the pgadmin SQL query window example

ERROR: syntax error at or near "\" LINE 750: . ^ SQL state: 42601 Character: 18590

openpim commented 3 years ago

Hi,

You should not use pgadmin to see this SQL. This is sql created by pg_dump, so this is not simple SQL but this is also a backup of the data.

You can import it into empty database by "psql -U [user] -d [db name] < init.sql" and you will not have any errors during such import.

Regards

OrderedWEB commented 3 years ago

Hi

Hi, Please bear with me, Im brand new to PostgreSQL

If I run

psql -U [postgres] -d [postgres] < init.sql

in my psql terminal, it doesnt do anything. Presumably because i need to reference the file location properly. is there a correct directory to drop the file in?

OR assuming if put the file at the root of my C drive, what do I need to ammend the command to?

Sorry to be a pain and thank you for your time

Richard King

openpim commented 3 years ago

Hi Richard,

Seems we are talking about Windows OS (if you are talking about drive C). So here you should download init.sql file to any directory and then run something like this:

"C:\Program Files\PostgreSQL\13\bin\psql" -U [db user name] -d [db name] < C:...\init.sql

  1. You should take your path to psql program - "C:\Program Files\PostgreSQL\13\bin\psql"
  2. [db user name] should be replaced with real name of user in database
  3. [db name] should be replaced with real db name
  4. C:...\init.sql and you need real path to your init.sql

Also if you want we can have a call (at next week) by Google meet and I can help you to start our system. Just write me at team@openpim.org