We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33067
    • 2 Posts
    Hi there,

    I’m sure this is a simple one, I’ve uploaded the unzipped modx files to my website host in public_html/modx

    I haven’t setup a database before but I created one via my cPanel named "modx" which shows up as "dex_modx" with a user of "modxUser" that shows up as "dex_modxUser" all privileges have been allowed.
    As I go through the modx install "New Installation" then "Connection Information" added in login name and password but then I get the following message"Connection to host: failed!

    When I view the database in phpMyAdmin there are No tables found in database?
    If I need to add a table what should it be called and what number of field would be required?

    I’ve also updated the CHMOD to 777 on the appropriate files?

    Any ideas what I’m doing wrong?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You have to get the hostname (usually "localhost", but sometimes not), username, and password right before it can connect to the actual database host. Then it checks to see if it can select your database.

        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
        • 33067
        • 2 Posts
        When you say usually "localhost, but sometimes not" is there an absolute way to refer to the localhost maybe something I could find via phpMyAdmin?

        Would I need to create a table in the database or its not important ie Table prefix?

        The Collation in modx defaults to utf8_general_ci, I’ve set the Collation to this in phpMyAdmin.

        Thanks
          • 7231
          • 4,205 Posts
          When you say usually "localhost, but sometimes not" is there an absolute way to refer to the localhost maybe something I could find via phpMyAdmin?
          When logged into phpmyadmin you will see the database server name (i think that cpanel is normally localhost, if not you need to ask the hosting admin).

          Would I need to create a table in the database or its not important ie Table prefix?
          The install will create all the needed tables in the databse you specified in the connection string (localhost is the server, database name would be the name of the db).

          The Collation in modx defaults to utf8_general_ci, I’ve set the Collation to this in phpMyAdmin.
          Sounds good. Remember to use the databsename and username the way that they show up in cpanel (with the prefix: dex_ in your case) cpanel will automatically add the account prefix to the databases and users.

          I almost forgot, also in cpanel you need to assign the user to the database. So the steps would be to 1) create database, 2) create user for the database, and 3) assign user to database. And dont forget the prefixes.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]