Importing mysql database


#1

Hello

I am currently transefering my site to it’s new location here at dreamhost. However, the site runs on a content management system, which has a mysql databe in order for it to run.

So, i will need to get that database over to dream host also.

I have dumped the db from my previous host, and saved it on my computer. How do i go about importing it??

I have absolutely no experience with mysql.

If anyone would be so kind to give me the directions on how to import the database, it would be very much appreciated


#2

If you’re file isn’t very large, you can just log into Php-myadmin and do the import.

If it’s large, then you’ll need to do ti from a telnet /SSh terminal.

A search of the K-base will find you instructions on how to do this. (either process)

-Matttail


#3

The size of the db is 150 kb

But how to i go about importing it ? :slight_smile:
I didn’t find any imformation noobish enough for me to understand


#4

sorry about that, I thought for sure there was a write up on using Phpmyadmin in the K-base. Oh well.

Here goes…
Log into PHP My Admin via your mysql host name that you created. Something like mysql.domain.com. Use the user name and password you created for the database.

On the Left hand side, you’ll see a coloum with some little icons along the top. Click the one that says SQL on it. That should pop up a new window. Click 'Import Files". Browse to find the file you want to import on your comptuer. Then click “go”

With luck that will work, and you’ll get a happy response. If you get errors post here, and hopefully someone will be able to help you.

Of course there’s a more geeky way to do this, and that process is outlined in the K-base. Here
You’ll need to log into dreamhost via Telnet or SSH. Windows has a telnet program allready installed that will work Start> Programs > Accessories >Communication > Hyper Terminal.

To log in there, you’ll need to know the machine you’re hosted on here at dreamhost. You should have such information in your welcome E-mail I believe. For me it’s Galage.dreamhost.com Then you log in with the user name / pass that is excuting CGI for your Domain. (the user you selected when you set up the domain, or the default user created with the account setup)

You’ll also have to had up-loaded the sql file with an FTP program. If this is confusing, or too much work - then you should be able to just stick with phpmyadmin. If you want to be able to brag to your buddies that you dilled in the tables and data for your datbase via a command line console, then try out this method. :slight_smile:

does that help clear things up?

-Matttail


#5

Thank you for the thoroughly explained response. It gave me a clear view of how to do things.

However, as usual with my luck, i got a mysql error when trying to import the database:

#1044 - Access denied for user: ‘runilo@205.196.208.0/255.255.240.0’ to database ‘runilo_mambo’

And for some reason, i’m not authorized to do that shh thing.
Can’t log in…

Í have been with this host for one day now, and i’m seriously thinking of moving. The support is in my oppinion horrible. Yes, they can respond quickly, but the information does not help.
They brag about an extensive knowledge base, but the problem is that it is written for people with a masters degree in servers.

Not only am i not able to import a neccesary database, my site is also down!!

Site Temporarily Unavailable
We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.
error id: “bad_httpd_conf”

But thank you for the responce, it really cleared things up…They should think about posting it in the knowledge base


#6

First off, I’m sorry you’re not enjoying you expirence with DH. Not much to do about that one. There has been some discussion of Other hosts, and their merits in the Off Topic discussion area. I would however sigguest that you give things just a little more time. To me DH has a bit of a settp learning curve. things run differently here than they do at other places. Expecially when you’re used to Cpanel and Plesk. However, IMO, most people grow to like what DH does a lot. But it can’t be for every one.

As far as loging in with Telnet, I forgot about this: By defult a user is set up as FTP only. Log into the Control Panel Click: Users> Users> Then click Edit across from the user name you want to log into Telnet with. Put a check next to "Enable ssh/telnet? " and click save changes. That user now has the access needed to log in.

As far as your access denied 1044 error, did you get that when trying to log into phpmyadmin or when trying to run the import? You should be loging in with the user name and pass for the database, not what you log into the panel with.

If your site isn’t back up yet, you should put a ticket into support - they will help clear that problem up.

-Matttail


#7

Thank you, i now have acces to ivan.dreamhost.com through a program called putty.

I hope i’m not being difficult and demmanding too much, but is it possible for you to tell me what to type into this program, in order to import my database?

By the way, i got the error message when trying to import.

To what directory should the sql file be uploaded before doing the ssh thing?


#8

You’d type in something to the effect of

mysqlimport -L -hHOSTNAME -uUSER -pPASSWORD DATABASE DUMPED_TEXTFILE

  • OR -

mysql -hHOSTNAME -uUSER -pPASSWORD DATABASE < DUMPED_TEXTFILE

fill in hostname, user password, etc with the correct informaiion. also please note that things are case sensitive.

The above informaiton is from the K-base artice that I linked to in an earlier post.

You’re not being too demanding or difficult at all.

-Matttail