would a db work & function on one host while site on the other??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spacedog
    Yes that IS me. Bitch.
    • Nov 2001
    • 14149

    #1

    would a db work & function on one host while site on the other??

    If I move a site to another host, & the mysql databases are still on the old host, but I don't change the mysql info in the script when I move it, will it still run off the old host til I ca figure out how to move it...

    several people told me how to do it, but it's not working...
  • aflex
    Confirmed User
    • Oct 2002
    • 3127

    #2
    different hosting companies or a different box with the same hosting company? if its a diff hosting company, i would think you would take a performance hit
    self made mothafucka.

    buying premium domains & developed sites with revenue/traffic -> adaptweb at gmail.com

    Comment

    • CaptainHowdy
      Too lazy to set a custom title
      • Dec 2004
      • 94198

      #3
      Good question... i'm going to try that.

      Comment

      • mrkris
        Confirmed User
        • May 2005
        • 2737

        #4
        Any time your database is across a network, you suffer a major performance hit.

        PHP-MySQL-Rails | ICQ: 342500546

        Comment

        • DutchTeenCash
          I like Dutch Girls
          • Feb 2003
          • 21684

          #5
          same network yes thats possible did that

          ICQ 16 91 547 - SKYPE dutchteencash
          bob AT dutchteencash DOT com
          ... did you see our newest Sweet Natural Girl Priscilla (18)?

          Comment

          • Theo
            HAL 9000
            • May 2001
            • 34515

            #6
            of course

            Comment

            • duckduckgoose
              Registered User
              • Mar 2006
              • 82

              #7
              depends on how you had it set up originally; if your original database settings were absolute (eg using the actual internet-reachable name of the server hosting the database), then the lookups would still work when the site and scripts were moved to another box. However, people almost never do this, and instead use "localhost" as the name of the database server when situated on the same box. This is done for convenience purposes, as well as to avoid dns lookups of a FQDN that is in reality located on the same box.

              As mentioned above, you will get a performance hit on lookups, but depending how close the two hosts are to each other, it may be small or large. Best advise would be to only do it as little as possible. Your new webhost will likely also count all traffic for the database lookups and results sent back against your quotas -- this could be a significant amount depending on the application you have in mind.
              rRhino.com ...social networking for book fans...

              Comment

              • gregalicious
                Registered User
                • May 2005
                • 62

                #8
                Even if you're using a FQDN (fully qualified domain name) for the db host both hosts need to allow remote connections on port 3306.

                Comment

                • evulvmedia
                  Confirmed User
                  • Jun 2006
                  • 441

                  #9
                  firewall issue...

                  you also need to pay attention to any firewalls...

                  some hosting companies have a firewall that blocks external access on the DB ports and only allows usual internet traffic such as HTTP, POP, etc...

                  if such a firewall is present between the network your webserver is on and the new network your DB is on, you will not be able to connect to the db at all... (or at least without fooling around with access ports, or redirecting them, either way its not easy...)

                  Comment

                  • nestle
                    Confirmed User
                    • Apr 2006
                    • 647

                    #10
                    Also, depending upon what control panel your host uses, you may need to log into your control panel and add the IP address of your new host's server to the access host.

                    Cpanel and DirectAdmin has this so that mysql databases can only be accessed from localhost by default but you can have to so that they can be remotely accessed.

                    Comment

                    • zagi
                      Confirmed User
                      • Jan 2004
                      • 1238

                      #11
                      Originally posted by spacedog
                      If I move a site to another host, & the mysql databases are still on the old host, but I don't change the mysql info in the script when I move it, will it still run off the old host til I ca figure out how to move it...

                      several people told me how to do it, but it's not working...
                      Yes it can work, most likely the database permissions are just set incorrectly.
                      Managed US/NL Hosting [ [Reality Check Network ]
                      Dell XEON Servers + 1/2/3 TB Packages ICQ: 4-930-562

                      Comment

                      • directfiesta
                        Too lazy to set a custom title
                        • Oct 2002
                        • 30288

                        #12
                        Did you change in your scripts (the config file ) localhost to the actual FQDN ...?
                        I know that Asspimple is stoopid ... As he says, it is a FACT !

                        But I can't figure out how he can breathe or type , at the same time ....

                        Comment

                        • spacedog
                          Yes that IS me. Bitch.
                          • Nov 2001
                          • 14149

                          #13
                          Originally posted by directfiesta
                          Did you change in your scripts (the config file ) localhost to the actual FQDN ...?
                          actually, I found out that if I site to site transfer all the files, then overwrite the script files locally, I can then reinstall them from root & then reconfig during install then manually add all the trades & info... so, I do all this & when it's all ready, then I can change the dns from old host to that of the new one.

                          So, that's for the sites with tradescripts, but now my problem is how to get the blogs moved over... I tried everything everyone's told me & it's just not working... I called the new host & the tech guy sounded like he was outsourced, I couldn't even understand him...he put me on hold & I waited 15 minutes & hung up.. fucking people like that piss me off.. ..

                          Seems like I'm going to lose alot of traffic.... I got some blogs & sites with .be domains from eurodns, & when I tried to change the dns, it wouldnt allow me to without changing the whois info, claiming that the . in between my initials used during the initial registration is an invalid character.. so, fuckit, I go to fix it like they want & the fuckers want to charge me 16 euro for it, & i got 20 of these domains, 13 of which I use, have traffic, & want to keep, so 16 euro x 13 = $300+ just to change my fuckin name.. why bother when the things going to expire in 5 months & then I'll have to pay $300 more again.... been nothing but headache all weekend, all because of wanting to move to a better hosting solution....

                          Comment

                          • directfiesta
                            Too lazy to set a custom title
                            • Oct 2002
                            • 30288

                            #14
                            Originally posted by spacedog
                            actually, I found out that if I site to site transfer all the files, then overwrite the script files locally, I can then reinstall them from root & then reconfig during install then manually add all the trades & info... so, I do all this & when it's all ready, then I can change the dns from old host to that of the new one.

                            So, that's for the sites with tradescripts, but now my problem is how to get the blogs moved over... I tried everything everyone's told me & it's just not working... I called the new host & the tech guy sounded like he was outsourced, I couldn't even understand him...he put me on hold & I waited 15 minutes & hung up.. fucking people like that piss me off.. ..

                            Seems like I'm going to lose alot of traffic.... I got some blogs & sites with .be domains from eurodns, & when I tried to change the dns, it wouldnt allow me to without changing the whois info, claiming that the . in between my initials used during the initial registration is an invalid character.. so, fuckit, I go to fix it like they want & the fuckers want to charge me 16 euro for it, & i got 20 of these domains, 13 of which I use, have traffic, & want to keep, so 16 euro x 13 = $300+ just to change my fuckin name.. why bother when the things going to expire in 5 months & then I'll have to pay $300 more again.... been nothing but headache all weekend, all because of wanting to move to a better hosting solution....

                            Shit ... If the " . " was good originally, it still should be good now ...
                            And since when you have to pay to change info ( at least for the .com, .net, .org, etc..).

                            Now on the blog ( Wordpress I presume ) you need to:

                            - save the db text file to your computer
                            - Create DB on the new server, create users, add users to db
                            - Install script on new server
                            - import db file from computer to new server thru phpmyadmin...

                            This is why Rsync is easier, because the whole site ( including webmail ) gets imported automatically in one shot ...
                            Or thru WHM, your host could do that in a few minutes... You could do it if they give you a WHM with shell ...

                            If you want I could take a look at your old host. If interested, use my ICQ... I am around for the next hour.
                            I know that Asspimple is stoopid ... As he says, it is a FACT !

                            But I can't figure out how he can breathe or type , at the same time ....

                            Comment

                            • SinSational
                              Confirmed User
                              • Oct 2004
                              • 1723

                              #15
                              yes it will work. use the IP of the remote host instead of "localhost"

                              ICQ# 273099174 - monthly specials - 2 Month Free Credit on All Plans - 100% Referrals - chris@ for details
                              Virtual from $14.95/month, Dedicated from $149.95/month
                              Dual-Core Xeon > 1000GB @ $149.95 | 1500GB @ $169.95 | 10Mbps @ $269.95

                              Comment

                              Working...