1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help moving hosts and dns question?

Discussion in 'Server Configuration and Hosting' started by Will75, Mar 3, 2015.

  1. Will75

    Will75 Member


    I wish to move my XenForo website from a shared host to a dedicated server running Debian. I have done a bit of research on how to do this, but I'm still quite confused as to how exactly I'd go about doing so.

    I have Apache2 and Php installed. So far all I've done is copied my website's files and uploaded it to "/var/www." I'm not entirely sure if that's the correct place to upload the files, though..

    The next thing I'd have to do is copy over the MySQL database? On my shared host, I don't seem to have access to SSH. Is there a way to copy the MySQL database either through FTP or cPanel? From there, how would I go about "importing" the database to my new host? I run other things on the machine that require MySQL and I do have PhpMyAdmin installed.. however I don't think I can use that. I do, obviously, have SSH access to the dedicated server -- is there a command line to import the database some how?

    So, if I'm able to move the files over and if anyone can help me on how to move the databases, would that be it, or is there anything else I'd need to do to get the website working on a new host?

    Finally, how would I make the numerical IP address use my domain? So for example, if my dedicated server's IP is xxx.xx.xx.xx, how would I turn that into mydomain.com? I'm extremely new to this, so bear with me please. I'm using cPanel's "DNS Zone Editor" right now. If I try to make a CName or A record, it requires <blah>.mydomain.com. I simply want people to be able to go to "mydomain.com" or "mydomain.com/forums" or whatever the URL is to access the website. Right now people can access the website via "mydomain.com" because I'm using a shared host's web-hosting service type thing. Sorry again, I'm extremely new to this, but perhaps someone could be so kind as to help me. :)

    Any help would be greatly appreciated!
  2. teletubbi

    teletubbi Active Member

    To import the DB use this command.

    mysql -u username -ppassword databasename < filename.sql

    Where databasename is the database you create already on your new server.
    And filename is the name of the dump you make before from the other DB at the shared host after you copied to your new server.

    Read this also.
  3. Will75

    Will75 Member

    Hey, thanks for the reply.

    So basically, say I make a database called "Forums" -- it'd be empty, with nothing in it, as it's a new database.
    Then, say from my shared host, the database is called "myforums.sql," I'd do

    mysql -u username -p password Forums < myforums.sql?

    Would I just put the database anywhere, say for example the "/home" directory?

    EDIT: Okay so I did that command I get an error, "No file or directory has been found."

    Also, sorry, didn't know where to post this so thanks to whoever moved my post. :p
    Last edited: Mar 4, 2015
  4. Tracy Perry

    Tracy Perry Well-Known Member

    You will need to do a little more than "make" a DB. You have to create the DB (as root user), then create a new user with a password and then give that new user rights to the DB you just created.
    It's not that hard. If you want, hit me up with a convo and I can get you up and running fairly quickly with the basics.

    If I remember correctly, the default directory for Apache on Debian is /var/www/html - so that's where your actual forum script files/directories need to go.

    I'm about to go run and get another quart of oil to finish the oil change on my bike so won't be back for about 30 minutes (thought I had 5 on the shelf but only had 4).
  5. Will75

    Will75 Member

    Sent you a PM.

Share This Page