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

    I want to give a try to MODx after using postnuke, xoops and joomla for quite a while.
    So i installed it on a local XAMPP w/o any problems.

    When i try to install on my provider webspace, MODx will not connect to the database. My provider allows no connection to the database server, but only to the databases. So when the installer asks for dbserver, user and pwd there is no connection possible to check for the database...

    I tried to copy my local installation to the server and changed the settings in config.inc.php to match my provider. But when i try to open the manager there comes this error:

    PHP error debug
    Error: mysql_connect() [function.mysql-connect]: Access denied for user ’myuser’@’local3’ (using password: YES)
    Error type/ Nr.: Warning - 2
    File: /mypath/htdocs/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 am using modx evolution 1.0.1 and my config looks like this:

    /**
     *	MODx Configuration file
     */
    $database_type = 'mysql';
    $database_server = 'mysql.mydomain.com';
    $database_user = 'mydbuser';
    $database_password = 'mypassword';
    $database_connection_charset = 'utf8';
    $database_connection_method = 'SET NAMES';
    $dbase = '`modx_db_name`';
    $table_prefix = 'modx_';
    


    Server, user, password and dbase are doublechecked and ok.

    Is there any way to come around this problem?
      • 4310
      • 2,310 Posts
      $database_server = 'localhost';

      Is the most common.
      If that doesn’t work do you have access to a DB management tool like phpMyAdmin?
      You can normal see the server name from there.
        • 18738
        • 5 Posts
        Servername, username and password ist correct. A former joomla installation worked just fine with the same settings.

        I gave it a try with ’localhost’ but get the same error.

        Marco
          • 4310
          • 2,310 Posts
          Have you already created the DB for Modx to use?
            • 18738
            • 5 Posts
            I installed MODx on my local XAMPP Server exported the tables and imported them on the webspace server.
            So the database is identically to the local system.
              • 15082
              • 195 Posts
              Have you tried to use the other connection method [tt]SET CHARACTER SET[/tt]?

              Greetz
              JUSI
                • 26931
                • 2,314 Posts
                anonymized-26931 Reply #7, 17 years ago
                could this be related?
                http://modxcms.com/forums/index.php/topic,31875.msg194053.html#msg194053

                The fatcow tech support came back with:
                >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                A space was there in the database name in the config.inc.php and has been corrected. Please check your site functioning again.
                  • 18738
                  • 5 Posts
                  I have tried the other connection method.

                  $database_connection_method = 'SET CHARACTER SET';
                  $database_connection_charset = 'utf8';
                  

                  and also with latin1, but to no success.
                  Hmmm, i also opened a trouble ticket at my providers support forum, maybe there is some problem with the database...
                    • 18738
                    • 5 Posts
                    Hi all,

                    after trying the different config settings w/o success i setup a new database on my webserver and droped the old one. After a new installation of MODx everything works fine.
                    Thx for your help!
                      • 4310
                      • 2,310 Posts
                      Glad to hear you got it working smiley