Newbie trying to import a sql file from another hosting company
Posted 28 August 2006 - 11:49 PM
Recently, I just moved my Wordpress blog from one hosting company to another. By following some instructions via the Wordpress website, I got to the part which asked me to upload my old .sql file. Using phpMyAdmin 2.6.2-pl1 I then click on the SQL icon to upload the database file. The problem, it only can upload files 8M and smaller (and my file is about 50M). I noticed just below the browse window a radio button for gzipped, so I gzip my file to just under 8M. When I upload it, it still times out on me.
Tech support suggested I use ssh (deep waters for me without a lifeboat in site). He gives me this command to use:
mysql -u USERNAME -p PASSWORD -h HOST localhost < your-file.sql
(let me stop right here. Is 'username' the username of the new sql server or is it the username of the sql file? I've tried both. For password, I have been using the password of my new database server.)
Anyway, when I execute this command, it then prompts me for a password. Is this the password of the .sql file that I am trying to upload? I have tried all passwords that I could think of and it is not taking it. Mind you, the support from my previous support company sucks so bad, asking them for this information would be like asking someone for the location of the WMDs. My hunch is that the same user/password imy former hosting company issued to me for ftp access would be the same user/pass for my database (since I have never had a need to access/change it).
In the meantime, I have been stuck in this neverending loop that keeps asking me for a password.
Thank you for your time. If you can respond to this in dummieese, I would appreciated.
Posted 29 August 2006 - 12:24 AM
Make sure your .sql file contains the write information for your database as well... (if this is the case anyway).
Sometimes it may time out because you are trying to access the wrong database or someting like that.
Running the command that local host suggested should work though if the .sql file doesn't contain any commands that the mysql server at your provider doesn't like. In my experience in the past with providers is that they give you a database server name, a database name, a database user name and a database password for that user. This may differ from provider to provider but so far that's been my experience.
the ftp account is totally separate from your mysql account ... if they are the same then it may be coincidental that it happened this way.
Another alternative is to try an import your data in chunks so that it won't time out.
Posted 29 August 2006 - 12:45 AM
> How/where would I bring these files back together?
>What tool can I use to break up this file?
Like I mentioned earlier, when I run the command line, it then asks me for a password. What password is it looking for?
Thanks for taking the time to answer some of my questions.
Posted 29 August 2006 - 01:31 AM
As for inserting into chunks... what you could do is export each table one at a time. This may take sometime depending on how many tables you have. unless you don't have access to that database anymore to export your data table by table.
If so then this could prove to be quite challenging. Since it is a 50MB file. I would suggest trying to do it through the command line. It will definitely be faster that way . Just ask your provider how to find out your username and password for that database. Once again make sure that your .sql file doesn't try to create a database... this will cause problems when trying to import your .sql file.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users