Problem with exporting
| User, date | Message |
|---|---|
|
Written by Saturday3AM
6 years ago Category: Import/Export 6 posts since Thu, 26 Apr 07 |
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. |
|
Written by ansgar
6 years ago 3976 posts since Fri, 07 Apr 06 |
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 |
|
Written by Saturday3AM
6 years ago 6 posts since Thu, 26 Apr 07 |
Thanks a lot! 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. |
|
Written by siMKin
6 years ago 104 posts since Sun, 01 Apr 07 |
http://dev.mysql.com/doc/refman/5.1/en/rename-database.html |
|
Please login to leave a reply, or register at first. |