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
Post a Comment