1. Home
  2. Hosting and Web
  3. Databases
  4. Connecting Drupal to a different database
  1. Home
  2. Hosting and Web
  3. Content Management Systems (CMS)
  4. Drupal
  5. Connecting Drupal to a different database
  1. Home
  2. Let's Start
  3. Migration
  4. Connecting Drupal to a different database

Connecting Drupal to a different database

If you need to change a database connected to CMS Drupal, the change will only take few minutes. Follow the steps bellow.

To change the database you will need to create a new database and have access to FTP account. Copy of the current database can be created by this guide. FTP login credentials can be access here: FTP login credentials article.

1. Log in to the FTP

  • For login to FTP you can use FTP client like FileZilla or Total Commander or our web interface ftp.active24.cz.

2. Go to directory where the Drupal is installed.

  • If you have Drupal installed at the domain domain.tld it is located in the “web” directory 
  • If you have Drupal on any of your subdomains (e.g. blog.yourdomain.tld), go to the sub directory and there locate your subdomain directory (e.g. /sub/blog)

3. Open a directory sites, then directory default where you locate file settings.php (path is /web/sites/default/settings.php) We recommend to make a copy first, just in case.

4. Locate this line of code:

$db_url = 'mysql://bY66ih07czzL:T89wQJY8vWMy@mariadb101.websupport.sk/bY66ih07czzL';

Description

$db_url = 'mysqli://username:password@localhost/databasename';
  • First “bY66ih07czzL” represents database name
  • “bY66ih07czzL” at the end of the line stands for database user
  • “T89wQJY8vWMy” is a password to the database
  • mariadb101.websupport.sk” is a hostname of the database

List of hostname (DB server) for each database can be found in the administration

  1. Select your domain in the Services tab
  2. Go to Databases section in the left menu
  3. Click on the name of your database in the list

You can see all login information in the left box:


Updated on September 10, 2024

Was this article helpful?

Related Articles