Jump to content


Photo

Newbie trying to import a sql file from another hosting company


  • Please log in to reply
4 replies to this topic

#1 lunchmeat

lunchmeat
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 August 2006 - 11:49 PM

Alright, from the top... ???

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.



#2 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 29 August 2006 - 12:24 AM

Using the commandline... the username is the username you would use to login to the database.  In this case, whatever your new provider gave to you (unless you were able to create your own).  The password should be provided with this user name that was created or that you created.

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.
What is the CoronaMatrix?

#3 lunchmeat

lunchmeat
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 29 August 2006 - 12:45 AM

Uploading this file in chucks sounds like a great idea (I'm assuming that you are talking about via the phpmyadmin web tool). If this is the case...

> 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.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 29 August 2006 - 01:25 AM

This would be your MySQL password, for whatever user name you are providing.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 29 August 2006 - 01:31 AM

The password should have been given to you by your provider.  Do they provide a web admin interface.  If so you should be able to go into your admin control panel through the web and find out the user name and password for the database.

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.
What is the CoronaMatrix?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users