Relationships between multiple databases

Created on 19 September 2025, 20 days ago

Problem/Motivation

It seems currently only view option is available for multiple databases and you cannot create "relationships" between:

Steps:
1.Update settings.php

$databases['default']['default'] = array (
  'database' => 'drupal_database_1',
  'username' => 'yourname',
  'password' => 'yourpass,
  'prefix' => '',
  'host' => '127.0.0.1',
  'port' => '3306',
  'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql',
  'driver' => 'mysql',
  'autoload' => 'core/modules/mysql/src/Driver/Database/mysql/',
);

$databases['second']['default'] =  [
  'database' => 'custom_database_2',
  'username' => 'yourname',
  'password' => 'yourpass',
  'prefix' => '',
  'host' => '127.0.0.1',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
];

2.Now refresh cache and you should be able to see second database as well.
3.Add table from second databse
3.Try to create a relationship - you cannot see first database there, hence unable connect custom_db with a drupal one :(

✨ Feature request
Status

Postponed: needs info

Version

2.0

Component

Documentation

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024