We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16880
    • 2 Posts
    Hi all,

    I’m new to MODx, MySQL and PHP but I have some experience of running my own Web server and sites.

    I’m running on Apache2 for windows on XP and have managaed to get to the install stages for MODx

    I’ve downloaded and installed MySQL5 and that seems to be happy enough. PHP is ver 4.4.2. I’m using IE 6 as my browser. Modx ver 0.9.1.

    On the installation pages at the page titled "Connection Information" where you set up your Database name, datbase host and Admin I’m getting stuck.

    I’ve left the database name as default so that MODx can generate it. I’ve set Host to "localhost" and login name to "root" along with the appropriate password.

    I’m constantly getting the "Conntection to Host failed" error. Progressing to the next page also states the same error. Can any one help please! huh
    • Two suggestions:

      1) try creating the database container first; though it should be created automatically in the next step after the error saying it could not connect is displayed (this is accurate, since the db container did not yet exist, so it warns you that the db does not exist and then tries to create it) -- however, some versions of the MySQL client API (compiled into your PHP) have trouble creating the database container using the method 0.9.1 used.

      2) it would be best to start with MODx 0.9.2.1, the current stable release, which should be able to get past this issue, regardless of your MySQL client API version.
      • Connection to host means it can’t connect to the server, either "localhost" isn’t recognized, or the username/password isn’t correct. It doesn’t mean that the database doesn’t exist. If it can connect, but the database doesn’t exist, it says so. On a Windows server, you need to check the hosts file (it’s buried in win32, drivers, etc or something like that) and make sure that it has the localhost entry.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 16880
          • 2 Posts
          Thanks for the input so far.

          When I type localhost in to the www address bar I get my apache test screen ok, does that eliminate the potential for localhost being set incorrectly?

          Thanks again Lee.
          • In that case "localhost" is OK. Are you sure that your mySQL engine is running?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 7923
              • 4,213 Posts
              And that you use correct port


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 33459
                • 1 Posts
                I have this kind of error also. This is the message I’ve got after pressing Test Connection buttion : Connection to host: passed... Checking database: failed - testdata does not exist! I created this testdata using MySQL Administrator and I could see it in the list of database. But I didn’t know why modx couldn’t connect to it. Please note that I created " testdata " without any table.

                Currently, I have Win XP SP2 , Apache 2.0.58, MySQL 4.1.20, PHP 5, Modx 0.9.2.1