distal-attribute
distal-attribute
distal-attribute
distal-attribute

Problem with exporting

Saturday3AM posted 8 years ago in Import/Export
I've read a few threads here and exporting seems to be a problem in 3.0. Before I knew that I exported a database to a sql file and deleted the original so now my problem is I only have one copy of this database and it's inside a sql file with syntax errors. I shouldn't have deleted the original so fast but this has always worked before so I didn't think this would happen. Here it is: _ I don't know much SQL, just the pretty basic stuff so I would appreciate if someone could point out what's wrong with the code so I can change it manually.

I get this error when trying to import it: SQL Error: You have an error in your SQL syntax; check the manual that correspondsto your MySQL server version for the right syntax to use near '"shop" /*40100 DEFAULT CHARACTER SET latin1 */' at line 1

If I remove that line it gives me an error on the next line it sais "shop" on and if I also remove that one it jumps to the first table name. It seems to me like it gets stuck on the double quotes around names but I can't see anything wrong with them.
ansgar posted 8 years ago
You selected "Standard ANSI SQL" as target version for your export. That's not a bug in HeidiSQL. You should have selected the matching version and everything would work. But don't panic. It's easy. Though a bit dumb piece of work:

Replace all surrounding doublequotes from database names, tablenames and field names with backtick: `. Don't do a automatic search and replace unless you can make sure the data itself doesn't contain any doublequote.

Btw, another guy in our bugtracker just encountered the same problem: https://sourceforge.net/tracker/?func=detail&atid=832347&aid=1708104&group_id=164593
Saturday3AM posted 8 years ago
Thanks a lot!happyMaybe it wasn't the problem I read about then but anyway it works fine now.

One more thing, is it possible to somehow change a database name? That's the thing I was gonna do by changing it in the sql file and re-importing.
siMKin posted 8 years ago
http://dev.mysql.com/doc/refman/5.1/en/rename-database.html

Please login to leave a reply, or register at first.