We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12013
    • 61 Posts
    Sorry people, not sure if this is the correct place to post this but I am having issues. I have set up my latest MODx site without any major issues. Everything was going well and all working fine. I had not looked at the site for about a week but I know it was all working as it should when I last looked. I browsed to the site today and was presented with this message.

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: mysql_connect() [function.mysql-connect]: Unknown MySQL server host ’cust-mysql01a’ (1)
    Error type/ Nr.: Warning - 2
    File: /websites/LinuxPackage02/co/un/ty/countygateholidayhomes.co.uk/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php
    Line: 87
    Line 87 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {

    Parser timing
    MySQL: 0.0000 s (0 Requests)
    PHP: 0.0496 s
    Total: 0.0496 s
    Error while inserting event log into database.

    It seems to be having issues connecting to the database, or so I think form my limited experience so i may well be wrong.

    PLEASE HELP!
      • 25663 MODX Staff
      • 12,272 Posts
      Correct the error is saying it can’t connect to the DB host "cust-mysql01a". Might contact your hosting provider as it sounds like the DB server went down or they changed the hostname.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 12013
        • 61 Posts
        cheers, I will see what they say. If either if these may be the case any idea how to fix as I cannot access the manger now either.

        If they give me new details would I have to perform an upgrade to MODx? would this keep all the relevant info intact?

        Via my control panel and php admin I can still access the DB using the same username and password?

        Sorry just trying to gather as much info as possible so I can hopefully be prepared when they reply

        Thanks again.
          • 3749
          • 24,544 Posts
          Just running install again and selecting "upgrade" shouldn’t hurt your data and might give you more clues (try the button that tests the db connection).

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 12013
            • 61 Posts
            right I have found the problem, the host name has been changed, I have run the install DB test with the new host name and it now finds it OK.

            Should I go ahead and upgrade? I obviously do not want to lose all the pages etc and data that is already there? Please advise!
              • 12013
              • 61 Posts
              Just want confirmation I guess,

              I have backed up the whole site and taken a copy of the DB. If I do an upgrade and uncheck all the modules so they do not write over the existing ones this should sort the problmem. I have tested the server connection with the modified host name and the connection is good.

              Sorry, just after some of your wisdom

              Thanks
                • 12013
                • 61 Posts
                Right,

                Problem sorted, I did not know but do now. Once I got the new host name I edited the config.php file and voila.

                Easy when you know how I guess, but all solved now.
                  • 3749
                  • 24,544 Posts
                  Quote from: hendo at Oct 16, 2008, 06:04 AM

                  Just want confirmation I guess,

                  I have backed up the whole site and taken a copy of the DB. If I do an upgrade and uncheck all the modules so they do not write over the existing ones this should sort the problmem. I have tested the server connection with the modified host name and the connection is good.

                  Sorry, just after some of your wisdom

                  Thanks

                  Yes, that’s how it should work. Glad you got it sorted. smiley
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting