We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37131
    • 111 Posts
    I have tried to move my test installation of modx from a subfolder to VirtualHost. I've done changes to my system according to "Moving Modx to a new server..." from Modx wiki and VirtualHost configuration from Apache, rerun MODX setup and stopped on testing database connection with these errors:

    Database type: mysql
    Database host: modxss
    Database login name: admin
    Database password: *******
    Database name: modxss
    Table prefix: modx_

    → Test database server connection and view collations.
    Connecting to database server:
    Could not connect to the database server. Check the connection properties and try again.

    [2012-02-16 22:39:32] (ERROR in xPDO::connect @ D:\xampp\htdocs\modxss\core\xpdo\xpdo.class.php : 344) SQLSTATE[28000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)

    [2012-02-16 22:39:32] (ERROR in xPDO::connect @ D:\xampp\htdocs\modxss\core\xpdo\xpdo.class.php : 344) SQLSTATE[28000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)

    I don't get why it says 'admin'@'localhost' when I have entered modxss.

    My hosts:

    127.0.0.1 localhost
    127.0.0.1 modxss

    My changes in httpd-vhosts.conf

    NameVirtualHost *:80

    <VirtualHost *:80>
    DocumentRoot "d:/xampp/htdocs/modxss"
    ServerName modxss
    </VirtualHost>

    <VirtualHost *:80>
    DocumentRoot "d:/xampp/htdocs"
    ServerName localhost
    </VirtualHost>
      ---
      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
      • 34084 ☆ A M B ☆
      • 756 Posts
      You'll need to modify your
      /core/config/config.inc.php
      file with your new DB connection information, then re-run the setup.
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.
        • 37131
        • 111 Posts
        I've made these changes already, setup script fills information about databases in this form from old config. When I run setup script I don't enter anything, just click next twice, advanced setup and I don't change anything on database config page. Cache dirs are cleared.
        I just don't get where from he gets this localhost. I've searched through all MODX files in my installation and there are some 'localhost' but only in standard modx files.
          ---
          Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
          • 37131
          • 111 Posts
          I was trying to get this working but no help. I don't know where is the problem.
          I can access phpmyadmin thru "modx" address in browser so I thin Apache and host configuration is ok.
          Even tried fresh install of modx using above parameters but setup still tries to connect to 'localhost' instead of modxss. sad
            ---
            Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding
            • 37131
            • 111 Posts
            PS. Don't know why but setup says "VERSION 2.1.3-pl" but files come from 2.2.0 package.
              ---
              Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Martin Golding