Database & Application Setup

Database & Application Setup

This guide walks you through provisioning a MySQL database, configuring your web application’s database connection string, and administering data tables using phpMyAdmin.


⚡ Activating & Retrieving Your Database Credentials

For security purposes, database access is disabled by default.
Your database credentials are generated dynamically through the Vooju Account Admin Panel.

Activating your Database credentials

  1. Log into your Vooju Account Admin Panel.
  2. Navigate to Account Settings from the primary menu navigation.
  3. Locate the Database Access status indicator and click “Disabled” to activate database access.
  4. The system will generate and display your:
    • Database Username
    • Database Password
    • Database Hostname

⚠️ Critical Action: Make an immediate, secure copy of these credentials. For your protection, the password will only be visible once and cannot be recovered later.
⚠️ Critical Action: You may reset the password by going through the process again, however any application accessing the database will need to be updated with the new credentials.

  1. Click the “I’ve made a copy” button. This finalizes the workflow and changes your FTP access status to Enabled.

⚡ Database Provisioning Steps

Before your application (such as WordPress, an e-commerce platform, or a custom PHP application) can store data, you will need to initialize the database and optionally restore existing backups.

Accessing Your Database

  1. Log into your Vooju Account Admin Panel.
  2. Navigate to: My Hosting ➡️ MySQL Admin.
  3. Log in using the generated database Username and Password.
  4. Upload your database dump file to restore or initialize your application data.

💡 Note:
For fresh installations such as new WordPress deployments, the database can be provisioned automatically through our WordPress Hosting Plans.


📂 Structural Application Connection Matrix

When configuring your application, use the database credentials generated during activation. Incorrect settings may result in a Database Connection Error.

Global Connection Values

Database Host (Hostname): Generated hostname (e.g.,vjuser_db1host.com)

Database Port: 3306

Database Name: Generated database name (e.g., vjuser_db1)

Database Username: Generated during activation (e.g., vjuser_db1user)

Database Password: Generated during activation

PHP Connection Template Reference

When hand-crafting standard PHP connection code scripts, ensure your structure mimics this robust PDO template layout:

<?php
$host     = 'vjuser_db1host.com';
$db       = 'vjuser_db1';
$user     = 'vjuser_db1user';
$pass     = 'YOUR_SECURE_PASSWORD_HERE';
$charset  = 'utf8mb4';
$port     = 3306;

$dsn = "mysql:host=$host;dbname=$db;charset=$charset;port=$port";
$options = [
    PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
    PDO::ATTR_EMULATE_PREPARES   => false,
];

try {
     $pdo = new PDO($dsn, $user, $pass, $options);
     echo "Connection established successfully!";
} catch (\PDOException $e) {
     throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
?>

🎛️ Manual Data Administration via phpMyAdmin

For manual database administrative work, table modifications, or database backups/restores, use our visual database administration interface:

  1. Inside your Vooju Account Admin Panel, return to the My Hosting ➡️ MySQL Admin screen.
  2. Login to your provisioned database account with the generated Username and Password.
  3. To Export/Backup Data: Select your database from the left hierarchy, click the Export tab at the top menu, select Quick method, and click Go to download a compressed .sql text file backup.
  4. To Import/Restore Data: Select an empty destination database from the left panel, click the Import tab, choose your local backup .sql file, and press Go.

🛠️ Common Application Errors & Fixes

Scenario 1: “Error Establishing a Database Connection” / Connection Timeout.

The Cause: The script configuration file contains a typo in the host node field (e.g., referencing a remote external IP domain or an absolute server node name).

The Fix: Ensure your connection profile configurations designate the hostname string precisely as assigned (e.g., vjuser_db1host.com). External cross-origin network paths are blocked by default for security.

Scenario 2: Access Denied for User vjuser_db1user@vjuser_db1host.com (using password: YES).

The Cause: The connection username syntax or the matching password token string is broken or mismatched.

The Fix: Log back into your Account Settings, click Database Access, and click Change Password to force-generate a fresh credential value. Inject the new string into your script file.