The correct database connection information provided in the Content Management System’s configuration files is vital for the website to establish a connection to its database and retrieve content.
Nexcess Cloud web hosting plans provide a great way to manage your website databases and database MariaDB users from the Nexcess Client Portal.
Managing passwords for MariaDB users in the Nexcess Cloud
In this Nexcess Knowledge Base guide focused on MariaDB administration, you will learn how to change passwords for MariaDB users from the Site Dashboard and update database connection information for your website.
Changing your MariaDB user password in 5 steps
The Nexcess Client Portal is a hosting admin panel that offers advanced options for website management. Thie control panel dashbboard is available with all Nexcess Cloud plans.
Follow the four steps below to change your MariaDB user password from the Site Dashboard:
- Log into the Nexcess Client Portal and choose a plan.
- Open the Site Dashboard.
- Open the Databases interface.
- Change your MariaDB user password.
- View your new MariaDB user password.
Step 1. Log into the Nexcess Client Portal and choose a plan
Log into your Nexcess Client Portal and choose one of your cloud hosting plans from the Plans page:
Step 2. Open the Site Dashboard
Choose the website you need to update database connection information for from the list under the cloud plan you opened. Next, click your domain name to access your Site Dashboard. Alternatively, you can open an additional menu using the three dots to next to your website’s IP address. Choose Site Dashboard from the menu and access your website’s management interface:
This step works for WordPress and WooCommerce plans. If you have a Magento or Drupal website, you will not need to open the Site Dashboard. Instead, the Databases page will be available from your cloud plan’s menu.
Step 3. Open the Databases interface
Choose Databases from the main menu in the Site Dashboard for WordPress or WooCommerce. The Databases page will show the users and databases you have created for your site. Open databases from the plan’s main menu for Drupal and Magento products:
The Create User interface allows you to add new database users. Click the plus icons on the right to add new MariaDB users and databases. You can also launch phpMyAdmin to work with your website’s database and perform MariaDB administration tasks without using the command line interface:
Step 4. Change MariaDB user password
Navigate to your website’s database’s MariaDB user, select the three dots on the right of the database name, and the choose Regenerate Password option:
Then, confirm you want to change your database user’s password. The system will reset the password automatically, and you can retrieve it:
Step 5. View your new MariaDB user password
Open the menu again and click View Password:
You can view your database’s MariaDB user password a limited number of times. Once the view limit is reached, you can no longer retrieve it from the Site Dashboard. You will need to regenerate it again. Make sure you save the new password and store it in a safe place:
Click the copy icon to save your new MariaDB user’s password. And then, finally, click Close to close the window:
Please note that the system will not automatically update your database user’s password in your website’ configuration information. Due to this fact, right after the password has been changed, you will see database connection errors. You will need to update your website’s database connection information to reflect the password change.
Update your MariaDB database connection information in 3 steps
Your website’s database is the central part of content rendering. CMSs abstract away the complexity of the process, which means that the only thing you, as the site owner, need to do is have the correct database connection information provided in the website’s configuration file.
The information you provided, including the database name, database user, and password, will be used by WordPress, Magento, Drupal, or any other CMS to establish a database connection and retrieve content. For example. if the MariaDB user’s password provided is incorrect, your website will throw an error establishing a database connection.
After resetting your MariaDB user password, you must update it in the website’s main configuration file.
Here are the three steps to update your database connection information:
- Log into your website via SSH or SFTP
- Open your website’s configuration file for editing.
- Update the MariaDB user password.
Step 1. Log into your website via SSH/SFTP
Locate your SSH/SFTP credentials from the Credentials page of your Site Dashboard. Connect to your website files using the username, password, hostname, and port number provided in the Nexcess Client Portal. Next, open your website’s CMS installation directory.
Step 2. Open your website’s configuration file for editing
Find your website’s main configuration file where you must update your database user’s password. For example, WordPress uses the wp-config.php file for this purpose:
- Drupal — settings.php from sites/default
- Magento 2 — env.php located in app/etc/
Next, use your preferred text editor to open the file via SSH or download the file, allowing you to open it on your computer if you have connected via SFTP.
Step 3. Change your database user’s password
Navigate to the lines in the configuration file that store your MariaDB user’s password. Please update it to the one you have generated through the Nexcess Client Portal. If you have created a new database and would like your website to use it rather than the old one, you must update the database name in the configuration file the same way.
WordPress /** The name of the database for WordPress */ define( 'DB_NAME', 'ad6461de_65c150' ); /** MySQL database username */ define( 'DB_USER', 'ad6461de_65c150' ); /** MySQL database password */ define( 'DB_PASSWORD', 'MyPassword' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );
Magento 2 'host' => '127.0.0.1', 'dbname' => 'a8114de9_testd', 'username' => 'a8114de9_testd', 'password' => 'MyPassword',
Drupal 'database' => 'ab84e212_53f00a', 'username' => 'ab84e212_53f00a', 'password' => 'MyPassword', 'prefix' => '', 'host' => 'localhost', 'port' => '3306',
Nexcess allows managing all technical aspects of your web hosting through the Nexcess Client Portal. Our user-friendly web hosting admin panel allows you to perform daily tasks that website owners can often find hard and time-consuming fast and easy.
Custom hosting solutions
Working on a complex project? Our experts work with you to build the perfect solution for your business.
You can perform MariaDB administration from the Databases page of the Site Dashboard or the main Plans interface. The MariaDB interface for creating users and databases ensures you can add and remove databases and database users and launch phpMyAdmin. After you have modified your website’s database connection information, you need to update your website’s configuration file to avoid any database connection issues.
Nexcess Cloud hosting plans are fully optimized for the chosen content management system to provide unrivaled performance and security. An enterprise-level technology stack with the best caching solutions, automatic backups, and core updates — check out Nexcess hosting plans to start today!
Note about the original publication date
This article was originally published in September 2019. It has since been updated for accuracy and comprehensiveness.