Announcement

Collapse
No announcement yet.

Using CRM with multiple databases

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using CRM with multiple databases

    Hello,

    First time poster. I have an issue and I was wondering if someone might be able to help.

    I'd like to be able to connect the CRM to multiple databases. I'd like to pass a variable in the URL (http://www.example.com/?i=[variable]) and based on the variable passed, Espo will connect to a different database on the MySQL server.

    What I hope to accomplish is to have one source code base on my web server that can connect to 1, 2 or even 3 different databases. Instead of duplicating the EspoCRM source code files and creating different web folders for each database instance.

    Anyone know a way to accomplish this?

    I've attempted to do so by creating different config files, and ideally the system will use a different one based on the variables passed to load and login to a different database. I've been able to successfully get the application to read and parse the value passed in the URL string by adding few lines to (data/config.php) a few functions in (application/Espo/Core/Utils/Config.php) and in testing using the application should load a different config file based on the value. However, it keeps loading the default config file created after installation and therefore the original database.

    Any help would be appreciated.

    Thanks!


  • #2
    I see that this is a few months old without any answers. Did you come up with a resolution? Anyone have an opinion as to whether two separate databases can be used?

    Comment


    • #3
      Any updates on this topic? I have basically the same question and want to be able to run 2 databases at same time.

      Comment


      • #4
        Hello,
        no, only one database per installation. You can try to hack it, but database structure depends on files. Add one field in Entity Manager for crm with first database will add this field as well for crm with other database after rebuild in 2nd crm.
        How to upgrade this 2DB crm?

        Database configuration is in data/config.php.

        Try to use portal or permit your data with roles

        Comment

        Working...
        X