-1

I've received the following .sql file plus some extra files:

First folder content

Here is the content of the Entities folder:

Content of Entities folder

I've installed PostgreSQL and within the pgAdmin tool I do "restore" and fill the fields as follows:

enter image description here:

But I get the following error:

enter image description here

Any idea?

UPDATE

I've managed to run the .sql import using the following command:

\i 'C:/.../.database.sql

But I get a lot of errors as below:

enter image description here

Any suggestions?

2
  • 1
    Just run the .sql using psql or pgadmin. No need to restore it. Mar 7, 2020 at 18:49
  • Thanks for your answers. When you say "just run" do you mean: 1) to run it from SQL Shell? 2) to run it as a query? 3) something else? Thanks!
    – Sebastian
    Mar 8, 2020 at 11:15

1 Answer 1

2

I'm sorry, but this won't work. The error messages in your console show that the SQL is using backticks (`), which is a distinctive feature of MySQL, a different type of SQL database. While both systems understand (ANSI) SQL, they use their own 'flavours' / 'dialects' which are not fully compatible with each other.

The simplest solution for you is to install MySQL instead. If you want to stick with PostgreSQL, there are tools available to convert between different database types (even free ones); how well they work depends from case to case.

3
  • ok thanks for your suggestion. I'm downloading MySql and I'll let you know.
    – Sebastian
    Mar 8, 2020 at 18:05
  • I worked. MySQL is more intuitive and easy to use. Importing the .sql file is super easy. thanks for your answer!
    – Sebastian
    Mar 8, 2020 at 20:06
  • @Sebastian: no wonder importing the data with MySQL was easier to do if the export was intended for MySQL. If it was a Postgres dump, it would have been as easy as running psql ... -f dump.sql
    – user1822
    Mar 9, 2020 at 6:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.