Understanding the Error
This error means your hosting plan does not allow database creation. Your current hosting package has a limit of 0 databases, preventing you from creating or managing MySQL/MariaDB databases.
Quick Solution Path
- Verify your hosting plan features
- Upgrade to a plan with database support
- Use remote database as alternative
- Try SQLite for file-based database
Check If Your Hosting Plan Supports Databases
Since your hosting limit is 0 databases, check if your provider allows database creation.
Check in cPanel
Step-by-Step Verification
Check Your Hosting Plan
Go to your hosting provider's dashboard and check your plan details under "Features" or "Database Limit."
Upgrade Your Hosting Plan
If your plan does not include databases, you need to upgrade.
Hosting Plans That Support Databases
| Hosting Type | Database Limit | Recommended for |
|---|---|---|
| Basic Free Hosting | 0 Databases | Static websites only (no CMS) |
| Shared Hosting (Basic Plan) | 1-5 Databases | WordPress, Joomla, small websites |
| Shared Hosting (Advanced Plan) | 10+ Databases | Multiple websites or CMS |
| VPS Hosting | Unlimited | High-performance applications |
| Dedicated Server | Unlimited | Large-scale projects |
Contact your hosting provider to upgrade and enable database support.
Alternative: Free Hosting with Databases
Some free hosting providers offer limited database support:
- InfinityFree: 400 MySQL databases
- 000webhost: 2 MySQL databases
- AwardSpace: 1 MySQL database
Use a Remote Database (If Allowed)
If your hosting does not allow local databases, you can use an external MySQL database from another provider.
Configure Remote Database Connection
Once you have a remote MySQL database:
Connection Steps
PHP Database Connection
$servername = "your-remote-db-host.com";
$username = "your_db_user";
$password = "your_db_password";
$dbname = "your_db_name";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
Ensure Remote MySQL is Allowed
If your hosting provider blocks remote MySQL connections, ask them to whitelist your remote database IP.
Now you can use a database without needing one on your hosting account.
Use a Flat File Database (If No MySQL Allowed)
If your hosting does not support MySQL, you can use SQLite (a file-based database).
Create an SQLite Database
Use this in PHP:
PHP SQLite Example
// Create or open SQLite database
$db = new SQLite3('my_database.db');
// Create a table
$db->exec("CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
)");
// Insert data
$db->exec("INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com')");
// Query data
$result = $db->query("SELECT * FROM users");
while ($row = $result->fetchArray()) {
echo "Name: " . $row['name'] . " - Email: " . $row['email'];
}
This works without needing a MySQL database!
Other Flat File Database Options
- CSV files: For simple data storage
- JSON files: For structured data
- XML files: For hierarchical data
- PHP array files: For configuration data
Summary of Fixes
| Issue | Fix |
|---|---|
| Plan does not allow databases | Upgrade hosting plan |
| Need MySQL but hosting doesn't support it | Use a remote MySQL database |
| No MySQL, but need a database | Use SQLite instead |
| Plan supports databases but shows 0 | Contact hosting support |
Final Recommendation
Now you can decide the best way to use a database for your website! For most dynamic websites, upgrading to a hosting plan with database support is the best long-term solution.


