Every PHP forum stores its members, threads and settings in a MySQL or MariaDB database. The forum installer creates the tables for you, but you first need to create an empty database and a user that can access it. This guide explains how to do that on shared hosting, what each detail means and how to fix the most common connection errors.
What you are creating
There are three separate pieces, and the installer needs all of them:
- The database. An empty container that will hold the forum's tables.
- The database user. A username and password that the forum uses to log in to the database. This is not your hosting login and not your forum admin account.
- Privileges. Permission for that user to work with that database. Creating a user does not automatically give it access, so this step is easy to forget.
You will also need the database host, which is the address of the database server. On most shared hosting it is localhost, because the database runs on the same server as your website.
Step 1: Open the database section of your control panel
Log in to your hosting control panel (often cPanel) and look for a section called something like "MySQL Databases", "Databases" or "Database Manager". Some panels offer a step-by-step database wizard that creates the database, the user and the privileges in one go. Either route works.
Check the database server version while you are there. Quick BB needs MySQL 8.0 or newer, or a compatible MariaDB. See forum software requirements for the full list.
Step 2: Create the database
- Find the "Create new database" field.
- Enter a short, clear name such as
forum. - Click the create button.
Many shared hosts add your account name as a prefix, so forum becomes something like myacct_forum. Write down the full name exactly as the panel shows it. Using the short name without the prefix is the most common reason the installer cannot connect.
If the panel lets you choose a character set or collation, pick utf8mb4 with a utf8mb4 collation. On current MySQL versions utf8mb4 is already the default. It matters because the older utf8 (utf8mb3) character set cannot store emoji, which members will certainly post.
Step 3: Create a database user
- Find the "Add new user" or "Create user" section.
- Enter a username, for example
forumuser. Again, the panel may add your account prefix. - Use the password generator, or create a long random password of at least 20 characters.
- Save the password somewhere safe, such as a password manager.
Use a separate database user for each application on your hosting account. If one site is ever compromised, the attacker does not automatically get access to every other database.
Step 4: Add the user to the database
This is the step people skip. Find the section for adding a user to a database, select the user and the database you just created, and confirm.
You will then see a list of privileges. For a forum installer, grant all privileges on this one database. The installer needs to create and alter tables, and later upgrades run database migrations that change the table structure. The user only gets these rights on the forum's own database, not on the rest of the server.
Step 5: Collect your connection details
You now have everything the installer asks for. Write it down in one place:
| Field | Example | Notes |
|---|---|---|
| Database host | localhost | Quick BB uses this by default. A few hosts use a separate host name, listed in their help pages. |
| Database name | myacct_forum | Include any account prefix. |
| Database user | myacct_forumuser | Include any account prefix. |
| Password | (your long random password) | Paste it rather than typing it. |
| Table prefix | forum_ | Quick BB's default. Change it only if several apps share one database. |
Step 6: Connect from the installer
Open install.php in your browser. After the requirements check, Quick BB's installer asks for these database details and offers a test button. Use it before moving on. If the test passes, the next step creates all the tables automatically. You never have to import an SQL file or touch a database tool.
The full process is covered in how to install forum software on shared hosting.
Fixing connection errors
"Access denied for user"
The username or password is wrong, or the user was never added to the database. Check the full prefixed username, paste the password again, and confirm the user appears next to the database in your control panel with privileges.
"Unknown database"
The database name does not match. Copy the full name, including the prefix, from the control panel. Names can be case sensitive on some servers.
"Cannot connect" or a timeout
The host name is wrong. Try localhost first. If that fails, search your host's help pages for "MySQL host name" or ask support. Remote database servers on shared hosting are uncommon but not unheard of.
The database is not empty
If you are reusing a database that already has tables from another app, use a different table prefix so nothing clashes. A fresh, empty database is simpler and safer.
Looking after the database
Once the forum is running, the database is the most valuable thing you own. Your members, posts and settings all live there. A few habits keep it safe:
- Back it up regularly. Quick BB includes database backups with optional uploads, history and retention, chunked to fit shared hosting limits. Download a copy off the server now and then. See forum backup and restore.
- Do not share the database password. Anyone with it can read every member's email address.
- Change the password if someone leaves your team who knew it, and update the forum's configuration at the same time.
- Back up before every upgrade. Upgrades change table structure, so a recent backup is your undo button.
With the database ready, you can move on to installing the forum, or check the Quick BB quick start for a short overview.
Frequently asked questions
What database host should I use?
On most shared hosting the database host is localhost, which is Quick BB's default. If that fails, your host's help pages will list the correct host name.
Do I need to import an SQL file?
No. You only create an empty database and user. Quick BB's installer creates all the tables automatically after the connection test passes.
What privileges does the database user need?
Grant all privileges on the forum's own database. The installer creates tables and later upgrades run migrations that change the table structure.
