WeaponX 0 Report post Posted February 26, 2007 Hi, I downloaded a backup of my forum database and wanted to import it on my computer locally for testing purposes. This has always worked for me in the past, but I'm having some problems with it lately. I'm backing up my database via phpMyAdmin->Database->Export->Select All and downloaded as a .gz file. I'm using Windows XP Home with WAMP installed, so it has MySQL built in. It's version 5.0.27. I ran all the services and at the prompt typed in: mysql -u root -p backup.sql > testDB My root account in WAMP has no password, so when it prompts for a password, I just hit ENTER. Then it shows me this error: ERROR 1102 (42000): Incorrect database name 'backup.sql'The path and filename are 100% correct....I'm positive on this. I downloaded the .gz file and had to extract it to get this SQL file. I have done this numerous times in the past without any issues. I tried restarting the service and even as far as reinstalling the whole WAMP package, but to no avail. Can anyone shed some light on this issue? Thanks. Share this post Link to post Share on other sites
yordan 10 Report post Posted February 26, 2007 have a look a the mysql exact syntax. the error message says that you forgot givint the database name. I guess that "backup.sql" is effectively the name of your backup sql script, so the error message is correct, the database name has not been supplied. Share this post Link to post Share on other sites
vhortex 1 Report post Posted February 26, 2007 have a look a the mysql exact syntax. the error message says that you forgot givint the database name. I guess that "backup.sql" is effectively the name of your backup sql script, so the error message is correct, the database name has not been supplied. mysql -u root -p backup.sql > testDB looking at this one.. i think that the database name was testDB, maybe just a syntax error. Share this post Link to post Share on other sites
.:Brian:. 0 Report post Posted February 26, 2007 (edited) I would have to say that maybe the filename that you are giving it is incorrect....You said.... downloaded as a .gz fileI think that would indicate that the file is something like backup.gz right?If that is the case...I think the correct stuff at the prompt would be something along the lines ofmysql -u root -p backup.gz > testDBNotice that i changed the .sql to .gz....Hopefully that helps, and if you were already doing that...i'm not exactly sure what is wrong....other than maybe it isn't liking the blank root password...Well anyhow,Good luck, and hopefully something somebody said here helps,Brian Edited February 26, 2007 by .:Brian:. (see edit history) Share this post Link to post Share on other sites
pyost 0 Report post Posted February 26, 2007 Actually, if my memory serves me well, those files are being exported as backup.sql.gz. Or maybe not Try both Share this post Link to post Share on other sites
bluefish1405241537 0 Report post Posted February 26, 2007 If WAMP has phpMyAdmin, I would suggest to just use that utility. You would avoid any possible syntax problems, not to mention it is just easier. Share this post Link to post Share on other sites
WeaponX 0 Report post Posted February 26, 2007 Trust me guys, I tried everything I could think of. In terms of the name, I just used backup as an example here. It's actually using my full name to create the backup followed by .sql.gz as mentioned above. The thing is that this .gz file is compressed and MySQL won't import it as it is right? So I had to extract it to get the full SQL file. I have done this exact procedure numerous times in the past before without encountering this kind of issue. I'm using root without a password since this is done locally. But it prompts me for the password after I type that line in and hit Enter. Blank password either way... Yes, "backup.sql" is the name of the file (I even checked in the command prompt to verify that there's no other extension after that) and testDB is the database I want this backup to go into. I already created that testDB file in phpMyAdmin if that helps because I recall that it will complain if it doesn't exist already...now that I think about it, might as well try it without creating it first. I doubt it will work... Any other suggestions? UPDATE: OK, something is definitely "screwy" here. I typed in: mysql -u root -p testDB < backup.sql and that actually worked this time. I know the example I mentioned above is different from this, but I have also tried this recent command before and it failed. It worked today for some strange reason. I was even able to create that "testDB" database without creating it first in phpMyAdmin. But after playing around with it more, I couldn't copy the backup.sql file into another "non-existent" database without creating first. All well...Just glad it's imported now Thanks for all the replies. Share this post Link to post Share on other sites
yordan 10 Report post Posted February 27, 2007 (edited) mysql -u root -p testDB < backup.sqlThis is the correct syntax.the user named "root" would like to execute the sql script named "backup.sql" in order to upload into the "testDB" database.Now, the correct syntax gives correct result, we can startup talking about normal things.Now, next time, if the same syntax does not work, this will mean that the "backup.sql" file is corrupted. Or that the "testDB" database has a problem.But, right now, let's be happy that a correct command line applied to a correct sql script gave us correct results. Edited February 28, 2007 by yordan (see edit history) Share this post Link to post Share on other sites
WeaponX 0 Report post Posted February 27, 2007 It's just been a while since I worked with mysql that I forgot the proper syntax. I thought I did it the other way and it worked in the past....I'm just glad it's working now Share this post Link to post Share on other sites
kentweather 0 Report post Posted March 5, 2007 any one know how to get the weather.com xml feed code woking does it require a mysql database Share this post Link to post Share on other sites
WeaponX 0 Report post Posted March 5, 2007 @kentweather, please don't post your question into someone else's (mine in this case ) topic. Create your own next time and someone will reply to it if they know of a solution.In regards to your question, take a look at:https://weather.com/weather/rss/subscription?from=footerThey have instructions in the links there. You will need to use a RSS Feeder program to subscribe and download the feeds. Share this post Link to post Share on other sites
iGuest 3 Report post Posted August 28, 2009 Hi, Kindly read very usefull article for huge sql data uploading at http://forums.xisto.com/no_longer_exists/-reply by khubab1 Share this post Link to post Share on other sites