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

    I am new to modx. I have a site I am building on server "abc", which is running great, but I want to be able to develop locally. So I installed locally and when going though the setup process. I get this error. Checking database: Table prefix is already in use in this database! Is there a way to just connect to that database without trying to make a new one.

    See attached.

    Thank you for any help.
      • 3749
      • 24,544 Posts
      Yes, you can select the table prefix during the install. The default is modx_ but you can change it.

      There is the question, though, of how it is that your local database already has tables in it with a modx_ prefix. It's also a good idea to have a separate DB for each MODX install. If you just use a different name for the database during the install, MODX will try to create the new one for you. If that fails, it's not all that difficult to set up a new DB.

        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
        • 44196
        • 15 Posts
        My local database does not have those tables. I am trying to have a local install, that references my live database on another server. The screenshot may help.

        Thanks again
          • 3749
          • 24,544 Posts
          The only time I've ever seen that message is when there are already tables in the DB with that prefix on their names. I'm can't think of anything else that could cause it, unless you left the table prefix blank in the Setup form.
            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            If during installation you are referring to the remote database, MODx will try to install its tables on your remote database.

            You can specify a different table prefix during installation, then after installing edit the config.inc.php file to specify the original table prefix, and delete the new tables.

            Or you can go ahead and install to a local database, then change the core/config/config.inc.php file to point to the remote 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