Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Posts
    64
    Plugin Contributions
    0

    Default Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Backup MYSQL Plugin - http://www.zen-cart.com/index.php?ma...products_id=81 latest version with ZC 1.5

    I get the error below.

    Result code: 2
    0 => mysqldump: Got error: 2005: Unknown MySQL server host 'localhost:3306' (1) when trying to connect
    Failure: The database has NOT been saved.

    safe-mode is off when I look at the PHP info but not sure where how to check the other possible blocks listed in the help file? I am on Hostgator Reseller and my database is located at define('DB_SERVER', 'localhost:3306'); according to the configure.php files.

    No big issue as I can still backup using phpadmin.

    Kind regards
    Tim

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Quote Originally Posted by nuganics View Post
    I am on Hostgator Reseller and my database is located at define('DB_SERVER', 'localhost:3306'); according to the configure.php files.
    Not sure if it'll be related or not, but as a general rule you should NOT be including the port number as part of the DB_SERVER name.

    Try setting it to:
    define('DB_SERVER', 'localhost');

    Cheers
    Rod

  3. #3
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Right. There's no need to specify the :3306 port number, especially since it's the default port used by MySQL anyway. Specifying it is redundant.
    That would only be relevant if your database was indeed on a *different* port, and then that backup script would need to be altered to handle it anyway.
    .

    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.

  4. #4
    Join Date
    Dec 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Hi Rod/DrByte,
    Thank you for he replies. Taking out :3306 from both configure.php files did the trick.

    Thanks guys.

    Kind regards
    Tim
    Last edited by DrByte; 9 Mar 2012 at 04:07 AM. Reason: commercial help request removed

  5. #5
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    For commercial help, see www.zen-cart.com/helpwanted
    .

    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.

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Quote Originally Posted by nuganics View Post
    Taking out :3306 from both configure.php files did the trick.
    Just out of curiosity, how/why did you manage to add the :3306 anyway?

    I assume that it must have been something you saw/read somewhere, because very few people know what a port number is, let alone managing to specify the correct/default number used by MySQL.

    As I say, just curious.

    Cheers
    Rod

  7. #7
    Join Date
    Dec 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Hi Rod,
    I think it might be because I was using Godaddy hosting before I was migrated to Hostgator. I guess it got in there from Godaddy as everything is crazy over there as I don't remember adding it.

    Cheers
    Tim

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Backup MYSQL Plugin 2005: Unknown MySQL server host 'localhost:3306' (1)

    Quote Originally Posted by nuganics View Post
    Hi Rod,
    I think it might be because I was using Godaddy
    Enuff said.

    Cheers
    Rod

 

 

Similar Threads

  1. Backup MYSQL Plugin
    By zmtak in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 18 Nov 2011, 03:55 AM
  2. BACKUP_MYSQL Admin Tool: Unknown MySQL server host
    By DML73 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 3 Sep 2010, 03:38 PM
  3. #2006 - MySQL server has gone away Local host when importing to localhost
    By sunflowertami in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 9 May 2010, 10:52 PM
  4. Backup MYSQL Plugin not restoring on Local Server
    By roeghar in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 May 2009, 06:22 PM
  5. MYSQL Backup Plugin, DNS is not reachable - Window Server
    By Royal in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 16 Oct 2008, 02:51 PM

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