We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11579
    • 9 Posts
    I’m new to setting up a MODX DB (although I’ve worked with them, once setup, for years). I’m having problems with setting up the Collations and Charsets. I’ve established the database on my server, Hostmonster, but when I go to set up the Collations and Charsets, the message I get is:

    Checking database:MODx could not create your database. Please manually create your database and then try again.

    I’ve tried every combination of Connection Character Set and Collation (keeping the two matched - ie. utf8 & utf8_unicode_ci) with no luck. And I can’t figure out how to do it manually on my server. I would appreciate any suggestions.

    Thanks!
    Glen
      • 3749
      • 24,544 Posts
      On some servers it’s necessary to create the DB by hand before running the MODX install.

      Use PhpMyAdmin from cPanel at the host. Look for the Databases section. Be sure to set it to UTF-8 if that’s an option.

      Create a database user for that DB with full rights and make a note of the username and password you set (some hosts will add a prefix to whatever you enter -- so use whatever the host reports when you run the MODX install).
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 18913
        • 654 Posts
        FWIW, I always create an empty database using cPanel/phpmyadmin beforehand, making sure the connection collation is set to UTF8-unicode. Then I select the database, go to "Operations" and make sure it is set to UTF8-unicode there.

        This info is then used in the MODX install. My point is that whether it’s necessary or not, I make sure that the collation/connection is set the same way in two places.

        Matt
          • 11579
          • 9 Posts
          Thank you both for the responses. When I set up the db in MySQL I checked all privileges. I did go back into the cPanel, using phpMyAdmin to set up a table. I had already set it up using utf8_general_ci before I got the second respinse. MODX installer is still not recognizing the table it set up. The message I get is:


          Connecting to mysql server: Success!


          - Checking MySQL server version: OK! Running: 5.1.47-community-log
          - Checking MySQL client version: OK! Running: 5.1.47

          Connection character set: utf8
          Collation: utf8_general_ci

          → Create or test selection of your database.

          Checking database:MODx could not create your database. Please manually create your database and then try again.

          I’m not clear how to get to "Operations" and since I’ve set it in utf8_general_ci is it necessary to change it to utf8_unicode_ci?

          Thanks again!
          Glen
            • 18913
            • 654 Posts
            I had a problem like that when moving a site. Set up the database, etc. etc. The installer would act like it was there but then bomb. Seriously pissed me off and took a whole day to figure out as I recall.

            Short answer : go check the privileges of your db user. As I recall, I had to make sure they had all privileges enabled/granted/whatever-the-heck it’s called. Turns out the user - for whatever reason - didn’t have everything allowed. Changed it and then the install could proceed. I think I might have also had a .htaccess set up with a faulty rewrite. I don’t think that was the problem, but I reset it to the default one.

            Anyway, give that a shot and let us know what happens. I’m pulling the above experience out of memory, as I didn’t write down what happened...
            Matt
              • 11579
              • 9 Posts
              No luck - I keep checking the db privileges but they are ALL checked. So no luck with that one.
                • 18913
                • 654 Posts
                I just noticed above that you mention setting up a *table* in phpMyadmin. Are you setting up a table once the DB is established?
                Matt
                  • 11579
                  • 9 Posts
                  Hi Matt -
                  Yes. I set up the db on my server in MySQL Databases & then a basic table in phpMyAdmin.
                  Glen
                    • 18913
                    • 654 Posts
                    Try deleting the table, so that you have just an empty database (no tables) before starting the MODX install.
                    Matt
                      • 11579
                      • 9 Posts
                      Hi Matt -
                      I went back & deleted everything and started over, created database, added user & selected ALL privileges, with no table attached. Still no luck.
                      Glen