Unable to import sql file in postgresql on Ubuntu - mysql

I 'm trying to import sql file in my database on postgresql using command line but I'm getting the following error.

Please have look at this wiki resource about quoting identifiers

Related

Data import (csv utf-8) into MySQL Benchmark 8.0 failed using Import Wizard showing syntax error 1064

I used Import Wizard to import a csv file (encoding UTF-8, I tried UTF-16, etc). However, I got such an error :
ERROR: Import data file: ("You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use near
'élection`,`Région d'élection`,`Profession`,`Permanence`,`Entête 1 P`,`Entete'
at line 1", 1064)
The special characters show correctly.
The MySQL Workbench import wizard seems like it fails to escape apostrophes in column names. I tested this with MySQL Workbench 8.0.29 and I got a similar error as you did.
This is reported as a bug here: https://bugs.mysql.com/bug.php?id=95700, but the bug is not yet fixed. They suggest a workaround of using JSON input files instead of CSV, but that doesn't help you if you must import CSV files.
Besides this bug, it is well known that the MySQL Workbench import wizard is [terrible for performance][4]. Even if you can get it to work by changing your column names, you won't be happy.
I recommend using the command-line tool mysqlimport or the equivalent SQL statement LOAD DATA. It's not a GUI, but it works with special column names, and it is orders of magnitude faster.

Why is there an error with the source command in MySQL

I'm trying to add the employee sample database for practicing with MySQL however there's an error since there's a source command and from what I've found it says that MySQL doesn't support this command anymore.
So, how could I add the complete database without any error?
[this is the code line where the source command is called]
SOURCE is one of the mysql client builtin commands. These are recognized by the mysql client, but not by the MySQL Server's SQL parser.
See https://dev.mysql.com/doc/refman/8.0/en/mysql-commands.html

SQL Error 1193 when attempting to import database

So I've downloaded a huge database from the internet and I'm trying to import it using mysql -t < data_dump.sql
After running this, I get the following output:
ERROR 1193 (HY000) at line 5: Unknown system variable 'statement_timeout'
I tried doing this with another SQL file previously, and it worked just fine. Sorry if this is a really easy problem to fix, I'm not very experienced with SQL.
Hello you have this error because you are trying to import the .sql file from an other database engine.If you want to use the .sql file you need to convert the dump file from postgre (syntax-format ) to mysql (syntax-format).
For more help check here

Error when trying to import SQL dumps into MySQL Workbench

I am currently trying to import several SQL dumps into MySQL Workbench, but I am receiving the following error:
ERROR 1231 (42000) at line 10: Variable 'sql_mode' can't be set to the
value of 'POSTGRESQL'
Operation failed with exitcode 1
The files I am trying to import have been downloaded from https://data.crunchbase.com/docs/2013-snapshot
Do you have any idea what might be causing this? My goal is to convert these dumps into CSV files that I can later import to Python, so if there is another workaround for this problem that would be very helpful.

import .db file to mySQL

I am trying to export my blog on Yola and migrate to wordpress but I am having some trouble. Yola does not let you export your posts, but after lots of digging online (How to convert .db file to .sql file) I was able to figure out how to download my posts as a .db file.
After more digging online I was able to convert it to a .sql file using a program called Valentina Studio.
When I try to import the file into mySQL I get this error:
SQL query:
INSERT INTO "BlogPostBlogTag"( "tagId", "postId" )
VALUES (
'8a49866b2d872c90012d9bb4a6bf4767', '8a4986c9436bcaa201436c2df939023f'
);
MySQL said: Documentation
.#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"BlogPostBlogTag"("tagId","postId") VALUES ( '8a49866b2d872c90012d9bb4a6bf4767',' at line 1
Would anyone have any suggestions on successfully importing the file into mySQL?
Try this with one quote:
INSERT INTO 'BlogPostBlogTag'('tagId','postId')
VALUES (
'8a49866b2d872c90012d9bb4a6bf4767',
'8a4986c9436bcaa201436c2df939023f'
);