mysql - How to import an .sql file into a Postgres database? -


when run following command import sql db postgressql,

psql -u homestead -h localhost <db name> < <backup.sql> 

it throws following syntax error.

error:  unrecognized configuration parameter "sql_mode" error:  unrecognized configuration parameter "time_zone" error:  syntax error @ or near "`" line 1: create table if not exists `addresses` ( 

any idea resolve issue. in advance.

you can use mysqldump create .sql file.
mysqldump -u username -p --compatible=postgresql databasename > outputfile.sql
can import .sql in postgresql database without error.
hope help.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -