Error while Importing MySQL dump into Aurora - mysql

I took a dump of my RDS MySQL database(5.7) with utf8 as character set and collation. Intent is to migrate the database to Aurora 5.6. During the import, I see an error where it complains about the query being incorrect. Now this is the dump file that mysql generated so my guess is that its having problem inserting the data in question. I checked for that data string in the dump and it does exist but I see nothing wrong in it. Here's the error I get during import. Any pointers ?
ERROR 1064 (42000): 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 ''2352eb05-7596-3' at line 1

Related

Create database in SQL and get an error but everything right

I try to install fleetspeak. Use Ubuntu 18.04.
First of all I run this
CREATE USER 'fleetspeak-user' IDENTIFIED BY 'fleetspeak-password';
Then I want to create database with this
CREATE DATABASE 'fleetspeak';
But has an error:
ERROR 1064 (42000): 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 ''fleetspeak'' at line 1
Why I can get this?
Try the create database script without single quotes in dbname
CREATE DATABASE fleetspeak;

Backwards compatible mysql dump

I am trying to port a database from mysql 5.7 to mysql 5.5.
At first, I used the following command
mysqldump -u root -p --all-databases > alldbs.sql
When I try to import the DB in mysql 5.5 I keep getting errors like
ERROR 1064 (42000) at line 572: 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 'STATS_PERSISTENT=0' at line 9
where it complains about STATS_PERSISTENT=0 statement.
Then I tried
mysqldump -u root -p --compatible=mysql40 --all-databases > alldbs.sql
but this just gives me
ERROR 1064 (42000) at line 26: 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 'TYPE=InnoDB' at line 22
where it complains about TYPE=InnoDB statement, which should be ENGINGE=InnoDB. Even with the --compatible option it still keeps the STATS_PERSISTENT statement.
Is there a way to port a mysql 5.7 database to mysql 5.5?
UPDATE
To be clear on my question, I am looking for relialble, i.e. no-hack way, to port the database. I already tried to replace TYPE with ENGINE, remove STATS_PERSISTENT etc. Something else always came up. I am not willing to jump through those hoops everytime I port the database. I am looking for a reliable way via mysqldump or a similiar tool to do the job.
If this is not possible then I will have to switch to an alternative DB.

getting error 1064 while importing data in phpmyadmin

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 'Usage: mysqldump [OPTIONS] database [tables] OR mysqldump [OPTIONS] --databa' at line 1
I am getting this error while importing my mysql database into phpmyadmin. What can be the reason?
This does not appear to be a valid export/dump/SQL file. If I had to guess, I'd say you redirected the output of mysqldump to a file, but used incorrect syntax when calling mysqldump, causing the error text to redirect to the file instead of the SQL code.
How big is your SQL file?
Try exporting again, being careful to monitor for errors this time. It seems to me you would have had to redirect stderr in this case, which is an odd thing to do, so you could also show us the command line statement you used to create the SQL file.

MySQL dump compatibility issue (from 4.0.26 into 5.5.41)

I am trying to transfer data from MySQL 4.0.26 into MySQL 5.5.41-0ubuntu0.12.04.1.
I am making a dump from MySQL 5.5 server via mysqldump it works but when I'm trying to restore it there a problem occures:
ERROR 1064 (42000) at line 20: 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 'TYPE=MyISAM' at line 4
Is there some way how to create compatible dump for MySQL 5.5. from MySQL 4.0?
This should work
mysqldump ... | sed 's/TYPE=/ENGINE=/g' | > dump_file
(...and be enough. In the link Jens posted, there's another substitute for timestamp(14), but MySQL does this automatically, if I'm not mistaken.)

restoring mysql backup

I'm trying to restore database from backup. I've create new DB:
CREATE DATABASE `my_db` CHARACTER SET utf8
after that I launch big sql, afrter some time there written
ERROR 1064 (42000): 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 ''oy7:
commandwy24:BroadcastCommandContentsy15:changeStructure:7y7:1080582i15ay7:1' at
line 1
Does anyone know what's up here? I've tried on two backups, and I don't think both are invalid.
Thank you in advance!