We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    UPDATE: I’d edited the config.inc.php file in /manager. I found another version in /manager/includes. Once edited, the connection appears to be fine. Now I just need to determine why document.parser.class.inc.php is looking into the old local directory rather than the host account directory for phx.parser.class.inc.php. Shouldn’t it be easier than this?



    I’ve just moved a local site up to a hosting account and am getting a database connection error. I’m installing the site in a sub domain for the time being, which is [siteUrl/sandbox]. Here are the steps followed:

    1. Used SimpleScripts to install MODx 1.04
    2. Created database using PHPAdmin
    3. Uploaded local site files to /Sandbox
    4. edited user, password, database, and table prefix values in config file.

    There error I receive reads:
    PHP error debug
    Error: mysql_connect() [function.mysql-connect]: Access denied for user ’admin’@’localhost’ (using password: YES)
    Error type/ Nr.: Warning - 2
    File: /home2/wesleypi/public_html/sandbox/manager/includes/extenders/dbapi.mysql.class.inc.php
    Line: 89
    Line 89 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true)))

    I’ve had the hosting provider’s support doublecheck the config file and database configuration. I also reset the database user/password info to eliminate the possibility of a mismatch.

    Are there any other possibilities or typical ’gotchas’ that I’m missing here?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There should not be a config.inc.php file in /manager/; it belongs in /manager/includes.

      PHx uses the path specified in the resource browser settings in your site Configuration, in the Interface and Features tab. You need to update that to reflect your new server’s path.
        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