Home » Categories » Web Hosting » Databases

How to change your MySQL database password

Changing the database password will likely require some changes to code in order to keep your site running. If you are unsure how to do this yourself, consult a web developer.

If your website uses a MySQL database to power it's content management system (CMS), or other functionality, you may find that on occasion it's necessary to change the password that is used for the website to connect to it.

A database connection will require the hostname, a database name, a username, and a password in order to successfully connect. Once the password has been change, you will likely need to edit at least one file in your websites file system in order to update the password, so you should identify where this file is before you make any changes. In most cases the file will have the name 'config', 'configuration', or 'database' in the name.

Some of the main configuration files are:

WordPress: ~/public_html/wp-config.php
Joomla: ~/public_html/configuration.php

You may want to change your database password because:

  • Your Content Management System (CMS) was subject to an exploit
  • An employee or web developer has stopped working for you
  • It's generally good practice to rotate password from time to time

To change your MySQL database password:

  1. Log into your Heart Internet account
  2. Navigate to either the Manage Web Hosting or Reseller Control Centre (depending on what type of hosting you have)
    1. If you're a reseller, you'll also need to further navigate to Manage Hosting Accounts
  3. Log into the eXtend control panel for the hosting account in question
  4. Once in the eXtend control panel, select the MariaDB Databases section
  5. Scroll down to the Manage MariaDB Databases section
  6. In the Password column for the database in question, enter a new  secure password
  7. Select the Modify option at the bottom to save the password

Now that the password has been changed, you will need to edit your websites code. If you use a Content Management System (CMS) such as WordPress or Joomla, this should be a simple change in the websites configuration file. If your website is bespoke and does not use an off-the-shelf CMS, you should consult your web developer.

1 (1)
Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF