We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6332
    • 8 Posts
    I am trying to create local copy of my site (runing at Dreamhost) on Windows XP SP3 using WAMP v2.1(Apache 2.2.17, MySQL 5.5.8 or 5.1.41, PHP 5.3.5).

    When I try to do Advanced upgrade (from 2.0.7 to 2.0.8, moving from root folder to subfolder modx) instalation fails after clicking on "Test database server connection and view collations." with message:

    Connecting to mysql server:  
    Could not connect to the existing database for upgrade. Check the connection properties and try again.


    My local server configuration meets all modx requirements because when I try "New Installation" method and click on "Test database..." everything works as expected:

    Connecting to mysql server:  Success!
    
    - Checking MySQL server version: OK! Running: 5.5.8-log 
    - Checking MySQL client version: OK! Running: 5.0.7-091210-$Revision:304625$
    
    

    and installation continues without any issues.

    While writing this post I found problem inside core/xpdo/xpdo.class.php on line 331

    This doesnt work:
    $this->pdo= new PDO($this->config['dsn'], $this->config['username'], $this->config['password'], $this->config['driverOptions']);
    

    So I used var_dump ($this->config) and replaced line with this:

    $this->pdo= new PDO('mysql:host=127.0.0.1;dbname=database;charset=', 'root', 'root', $this->config['driverOptions']);
    

    and everything works fine, no idea why because I just copied values from var_dump.

    Maybe this info can help someone in the future, meanwhile I am HAPPY because I dont need to manualy recreate my local copy.