I am trying to run a .sql script that uses postgresql. I have installed postgresql, and created a database to run the script in however I continuously get permission denied error on the file. Looking for a solution to issue or workaround to allow me to execute the psql script.
What I have Tried: BASH:
chmod 777 mysqlfile.sql
chown postgres mysqlfile.sql
psql commands:
\i /path/to/file/mysqlfile.sql
psql -U postgres -d testdb -a -f mysqlfile.sql
I have already looked at the following solutions and they did not resolve my issue: Sol1, Sol2, I used this site as instructions for setting up postgresql.
Currently I am getting a permission denied error when trying to run the commands I used above, an ideal solution/workaround would be to execute the sql script in postgres on a fresh database.
cat /path/to/file/mysqlfile.sql
do? ] – wildplasser