Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Location
    Colorado Springs CO USA
    Posts
    516
    Plugin Contributions
    2

    Default Database located on different domain from cart files

    I have moved my Zencart files to a new server on a different domain, but will keep the MySql database on the old server.

    Can someone tell me what to show for DB_SERVER in the catalog and admin configure.php files?

    The old entry is define('DB_SERVER', 'localhost:/tmp/mysql5.sock');
    The database is located on [myservername].macminicolo.net

    I'm guessing the configure.php entry would be something like:
    Code:
     define('DB_SERVER', '[myservername].macminicolo.net/temp/mysql5.sock');
    Can anyone confirm this or provide the correct syntax?
    www.aspenshopsonline.com - ZenCart 1.3.9h
    www.wilkssupply.com - ZenCart 1.3.9h
    www.un-du.net - ZenCart 1.3.8a

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Database located on different domain from cart files

    Keep the colon (:) just like before. Just replace "localhost" with whatever the new servername is.

    HOWEVER ... A VERY IMPORTANT NOTE: if your webserver and database-server are on different computers, and especially if they're in different physical locations, you run the risk of opening yourself up to security problems and SLOW performance.
    Database lookups over the physical bus are fastest. Over ethernet to another computer in the same network/datacenter are slower. Over internet connections to another physical location are MUCH slower, and could be intercepted/hijacked/sniffed by hackers if numerous security precautions aren't taken.

    Disclaimer: The changes you're talking about are advanced concepts and should only be attempted by those with strong knowledge of server security and networking skills.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2006
    Location
    Colorado Springs CO USA
    Posts
    516
    Plugin Contributions
    2

    Default Re: Database located on different domain from cart files

    Thanks DrByte. I appreciate your pointing out the caveats. In my case I would have had the worst scenario you pointed out so it's probably not a good idea.

    We are moving our websites from a shared hosting service to our recently purchased MacMini server at a co-location site. We have moved one of the three sites so far. Unfortunately a recent PCI scan required more configuration changes that resulted in that domain being down the last few days and techs still stumped.

    My idea was to restablish the ZC files back on the old host temporarily, point DNS there and give the techs some breathing room (and me back to sales) until the problems are resolved. Once the problem was fixed I would repoint the DNS back to the new server.

    I do have the option to copy the MySQL5 database to the old host, and given your fine advice, I think that is the better option.

    Ron
    www.aspenshopsonline.com - ZenCart 1.3.9h
    www.wilkssupply.com - ZenCart 1.3.9h
    www.un-du.net - ZenCart 1.3.8a

 

 

Similar Threads

  1. Replies: 1
    Last Post: 9 Jan 2015, 05:57 AM
  2. One linux domain - Different stores from different urls?
    By TShirtJohn in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 4 Oct 2010, 11:49 PM
  3. Add-on domain, where my Zen Cart is located, URL not showing
    By captbaker in forum Basic Configuration
    Replies: 3
    Last Post: 20 Jun 2009, 10:06 AM
  4. restoring database from zen cart files?
    By lisbet in forum General Questions
    Replies: 4
    Last Post: 12 Apr 2009, 05:09 PM
  5. Managing Files off different Server/Database
    By Ace of Dubs in forum General Questions
    Replies: 1
    Last Post: 15 Nov 2006, 11:39 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR