maliary Posted August 26, 2008 Share Posted August 26, 2008 Hi guys, I just did an Import of a sql file about 350MB's in size, I used the command prompt for this. There was a reserved word that I placed back ticks on as I got an error in the process. I had to open up the sql file in note pad which took quite some time before searching and placing the back ticks which eventually corrected the situation. Now, If my db was 4GB's big this would have been extremely difficult to do. Is there a tool or some other way for making these corrections to .sql files with errors ? Quote Link to comment Share on other sites More sharing options...
Mchl Posted August 26, 2008 Share Posted August 26, 2008 Could you show an example of what the necessary corrections were? Quote Link to comment Share on other sites More sharing options...
maliary Posted August 26, 2008 Author Share Posted August 26, 2008 The error was with the reserved word case, it did not have the back ticks to be `case`. So I opened the .sql file dump and made the change. Aside from opening files dumps in notepad. Is there another easier way for this ? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 26, 2008 Share Posted August 26, 2008 Is there another easier way for this Yes, alter your table and column names so that they are not reserved words. Quote Link to comment Share on other sites More sharing options...
Mchl Posted August 26, 2008 Share Posted August 26, 2008 MySQL Administrator from MySQL GUI Tools package exports database with `ticks` all over the place. [edit] Now that I check, so does mysqldump... Anyways, avoiding reserved words is a good advice. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 26, 2008 Share Posted August 26, 2008 Now, If my db was 4GB's big this would have been extremely difficult to do. Is there a tool or some other way for making these corrections to .sql files with errors ? You mean like sed? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.