We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8384
    • 55 Posts
    Hey, that all worked! I just had to have the database sit on the same server as the site did. and, calling the other page also works - eventually I’ll merge the php once I’m better at it!

    thanks again for your help.
    Happy New Year!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Actually I have some sites where the database is hosted on a different server than the domain. There’s no issues at all with it, except to have the correct server info in the config file.

      $database_type = 'mysql';
      $database_server = 'mysql.host.com';
      $database_user = 'username';
      $database_password = 'password';
      $database_connection_charset = 'utf8';
      $dbase = '`database`';
      $table_prefix = 'modx_';
      


      In the example config file above, the separate database server is a "feature" of the hosting provider, so access is not a problem.

      A possible issue with such a setup is that the database may be configured to only allow localhost access (this is done when creating the users; their access location can be "from anywhere", or can be restricted to the localhost or some other host).

      This one grants access to all tables on a database named somedb to someusr logging in from the localhost with a password of ’passwrd’:
      grant all privileges on somedb.* to someusr@"localhost" identified by 'passwrd';

      This one allows our someusr to log in to access all tables in all databases from anywhere:
      grant all privileges on *.* to someusr@"%" identified by 'passwrd';

        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