Web Hosting Forums

Page 1 of 2 1 2 LastLast
Results 1 to 15 of 25

This is a discussion on install existing database in the Hosting Talk & Chit-chat forum
I'd like to install an exising database into my account so I can follow a tutorial -- how can I do this without having to ...

  1. #1
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11

    install existing database

    I'd like to install an exising database into my account so I can follow a tutorial -- how can I do this without having to recreate the database from scratch? Can I just upload it?

    Many thanks...

  2. #2
    Like a star... Julian Muņoz's Avatar
    Join Date
    Oct 2002
    Location
    Colombia
    Posts
    1,368
    YEs, you can.

    First, ensure to have a dump of your existing database.

    Here's how to do a dump (this works on both, Windows and Linux)

    mysqldump -uUSERNAME -p yourdatabase > dbdump.sql

    This way, you will get a dbdump.sql file with all the content of your database.


    The next step is to create a new database in the server. Go to your cpanel and select Mysql Databases. Create a database, a new user, and then, grant permissions to the database for this new user.

    Ok, now, we have a new and empty database in the server. Right?

    If you want, you can ZIP your dbdump.sql file and upload it to the server. Then, login via SSH and unzip it: "unzip dbdump.zip".

    Now, the dump will be on the server. Run this command from the console to restore your dump to the new database:

    mysql -uALETIAUSERNAME -p newdbname < dbdump.sql

    This should work.
    Julian D. Muņoz - LANeros.com

  3. #3
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Thanks for the quick reply Julian --

    I'll try the steps you outline, as soon as I can figure out how to telnet into my account using Mac OS X. The terminal doesn't seem to want to let me do it, and I can't find an SSH client for Mac OS X.

  4. #4
    Like a star... Julian Muņoz's Avatar
    Join Date
    Oct 2002
    Location
    Colombia
    Posts
    1,368
    No problem.

    I just did a quick search on google and found this:

    http://www.macssh.com/

    Julian D. Muņoz - LANeros.com

  5. #5
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Thanks again Julian, I had already done the same -- MacSSH isn't for Mac OS X native, but rather carbonized for the Classic environment, which means Mac OS 9 running in emulation.

    MaCTelnet X is under devlopment, but hasn't been released yet.

    So I'm still searching...

  6. #6
    Like a star... Julian Muņoz's Avatar
    Join Date
    Oct 2002
    Location
    Colombia
    Posts
    1,368
    Oh, I see now.

    Sorry, I don't know much about the Mac OS environment

    So, the client must be Mac OS X compatible?
    Julian D. Muņoz - LANeros.com

  7. #7
    Loyal Client
    Join Date
    Oct 2002
    Posts
    378
    Try going to Downloads and doing a search for

    OpenSSH 2.5.2 ... in "Downloads"

    [edit] OOOPs, never mind, too many negative reviews lately[/edit]

  8. #8
    Loyal Client jkeller's Avatar
    Join Date
    Feb 2002
    Location
    Paris, France
    Posts
    1,502
    Mac OS X, as a unix-based OS, should offer ssh -- a no-frills version, sure, but it should but still be present.

    At the OS X command line, just try typing ssh. Usually, this spits out the command-line parameters that you eed to connect. I'd be surprised if you needed more than ssh + your domain name to connect. After that, the commands are exactly the same as when you're issuing commands in the local command line (I know you said you're not an expert on the Mac OS X environment, but it's good to know -- everything you learn for Aletia will help locally, and vice-versa).

  9. #9
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Thanks everyone for the input. Mac OS X does indeed have ssh capabillities -- but I can't make it connect to Aletia. Here's the error message I get:

    "The authenticity of host '(domain).com (ip.address.)' can't be established."

    Don't know what I'm doing wrong. At this point, it may just be easier to re-create the database using the web interface! but I would like to eventually solve this.

    Never had such problems telneting before.

  10. #10
    Loyal Client jkeller's Avatar
    Join Date
    Feb 2002
    Location
    Paris, France
    Posts
    1,502
    Originally posted by rojito
    Don't know what I'm doing wrong. At this point, it may just be easier to re-create the database using the web interface! but I would like to eventually solve this.

    Never had such problems telneting before.
    Actually, you're not doing anything wrong. The problems in this case are from the certificate for the secure layer -- telnet doesn't worry about the security, so that's why you haven't encountered this before.

    I'm not experienced with ssh in unix (and hence, Mac OS X). In my client, the first time that I connected it complained that the server certificate wasn't recognized and asked if I wanted to accept it. I said yes, and also had it store it (to prevent being asked again in the future). This might be an option for you, but I don't know how to trigger it.

    I found a collection of ssh man pages at this site. Only the ssh1 or ssh2 clients would be of interest to you.

    You might also want to search for OS X-specific help (since it's new to many Mac users, there should be a lot of beginner's type questions). It'll be worth your time to learn this, because there's a lot more that you can do via ssh than the Web interface(s). Plus, backing up db's is much more reliable from the shell than from the Web interface.

    Good luck, and let us know what you find if you're able to get it working. I'm looking at OS X myself, and so things like this interest me.

  11. #11
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Thanks for the help again, John. I am getting closer...

    now when I ssh into my domain, I'm prompted for a password, which I enter, then I get "permission denied." I do this 3 times before it kicks me out completely.

    The password I'm using is the one for my aletia account.

    BUT,

    The password I'm prompted for is for an email address:

    [email protected] (where "mydomain" is my personal domain.)

    I don't really get this.

    I'm a long-time mac user, and just moving into the Unix/shell world... thanks for being patient. i'm sure I'll crack this thing sooner or later.

  12. #12
    Loyal Client jkeller's Avatar
    Join Date
    Feb 2002
    Location
    Paris, France
    Posts
    1,502
    Originally posted by rojito
    I'm a long-time mac user, and just moving into the Unix/shell world... thanks for being patient. i'm sure I'll crack this thing sooner or later.
    I've been there! And as for my being patient, it's the least I can do as a blind person describing an elephant. I've never used ssh from the shell...!

    I can tell you that the "at" ("@") convention is a relatively universal thing. It jsut identifies a particular user on a given machine. Hence the apparent confusion with an e-mail address.

    Why it's not accepting your password, I'm not sure. It should be the same username and password combination as what you use to log in to your CPanel.

  13. #13
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Even closer now!

    I figured out that the user it was asking for was my name on *this* machine, not the host machine. So I used -l myUsername and got in.

    Now I'm looking at "bash-2.05$" and I don't know what the heck that means.

    Still learning....

  14. #14
    Loyal Client jkeller's Avatar
    Join Date
    Feb 2002
    Location
    Paris, France
    Posts
    1,502
    Originally posted by rojito
    I figured out that the user it was asking for was my name on *this* machine, not the host machine. So I used -l myUsername and got in.
    Ah, of course! (using my special slap-my-forehead font) It's probably got something to do with the validation process, and it needs to confirm that you're the actual local user. Nice to know, since as I say I haven't used this under a unix shell before.

    Now I'm looking at "bash-2.05$" and I don't know what the heck that means.
    You're in like Flynn! Every command (almost every one, at least) that works on your own machine will work on the remote machine. "bash" is just the name of the shell variant, and won't affect the commands that you'll be using.

    I'm glad this all seemed to work out for you. There have been other discussions in the Aletia forums about how to learn basic shell commands, if you do a search ("shell" and "ssh" would be good starting places, since people often mistake "ssh" for the actual shell itself). JulianD's original command suggestion (waaay back when ) is now something that you can do without any further worries.

    Have fun!

  15. #15
    Loyal Client
    Join Date
    Apr 2002
    Posts
    11
    Fwheew! Made it this far. Thanks John and Julian for the help.

    Another dumb question: where do the databases live on the Aletia server? When I ftp in, I can see 4 directories, none of which seem to be the place for the database. I imagine there's another directory up that I don't have immediate access to?

Page 1 of 2 1 2 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •