Managing MySQL Databases for Your Website
MySQL databases are the backbone of most modern websites. They store all of the dynamic content your site relies on — blog posts, user accounts, product listings, form submissions, settings, and more. Nearly every popular web application, including WordPress, Joomla, and WooCommerce, requires at least one MySQL database to function. The FREAKHOSTING Web Hosting Control Panel makes it easy to create and manage databases directly from your browser.Difficulty
Time
When Do You Need a Database?
If you are new to web hosting, you might be wondering whether you actually need a database. Here is a simple way to think about it: You need a database if your website stores or displays content that changes. A plain HTML page with static text and images does not need one. But the moment your site needs to remember things — like user logins, blog posts, product inventory, or form submissions — a database is required.You Need a Database For
You Don't Need a Database For
Accessing the Databases Section
Log In to the Web Hosting Control Panel
Open the Databases Tab
Real-World Example: Setting Up a Database for WordPress
Before diving into the individual steps, let’s walk through a complete, real scenario. Say you just purchased hosting and you want to install WordPress. Here is exactly what you would do:- Go to the Databases tab and click Add database. Name it something like
wordpress(the panel may prefix it with your account name, making it something likefh_wordpress). - Click Add user. Create a user called
wpadminwith a strong password likeG7$kLm9!pQx2. The panel may prefix this too, giving youfh_wpadmin. - Assign the
fh_wpadminuser to thefh_wordpressdatabase with All Privileges. - Head to your dashboard and find the MySQL IPv4 Address in the At a Glance panel (for example,
191.96.94.5) — click the copy button next to it. - When the WordPress installer asks for your database details, enter:
- Database Name:
fh_wordpress - Username:
fh_wpadmin - Password:
G7$kLm9!pQx2 - Database Host:
191.96.94.5
- Database Name:
Creating a New Database
Click Add Database
Enter a Database Name
wordpress, shop, or blog). The system will automatically add a prefix based on your account name, so wordpress might become fh_wordpress.Confirm Creation
Creating Database Users
A database on its own is like a locked room with no key. You need to create a database user and assign it to the database before anything can actually read or write data inside it.What Are Database Users and Privileges?
Think of it this way: the database is a filing cabinet, and a database user is a person with a key. Privileges determine what that person is allowed to do — just read the files, add new ones, edit existing ones, or throw everything away and start over. Here are the common privilege levels you will encounter:Creating a User Step by Step
Click Add User
Set a Username
wpadmin or shopuser. The system may add a prefix automatically (e.g., fh_wpadmin).Set a Strong Password
G7$kLm9!pQx2. Many applications will require you to enter this password later during setup, so save it somewhere secure.Assign Access and Privileges
Save the User
Managing Existing Databases
Once you have created databases and users, you can manage them at any time from the Databases page.View Databases
Manage Users
Delete
Connecting Your App to the Database
When configuring a website or application, you will need to provide your database connection details. Here is where to find each piece of information:localhost. Because your database server may be hosted separately from your web server, using the correct IP address ensures a successful connection.Example: WordPress wp-config.php
If you are configuring WordPress manually (rather than using the web installer), you would edit thewp-config.php file with your database details. The relevant section looks like this conceptually:
Example: General PHP Connection
For a custom PHP application, connecting to your database would look something like this:Using phpMyAdmin
phpMyAdmin is a web-based tool that lets you browse, search, edit, and manage your MySQL databases through a visual interface. Think of it as a spreadsheet viewer for your database — you can see all your tables, click through rows of data, run searches, and even edit individual records. No command-line knowledge required. What can you do with phpMyAdmin?- Browse your database tables and see what is stored inside them
- Run SQL queries if you need to fix something specific
- Import a database backup (
.sqlfile) when migrating from another host - Export your entire database as a backup file
- Search across all tables for a specific value (handy for debugging)
- Optimize or repair tables that have become slow or corrupted
Check for phpMyAdmin Access
Log In
Browse and Manage Data
Common Use Cases
WordPress and CMS Installations
WordPress and CMS Installations
E-Commerce Applications
E-Commerce Applications
Custom Web Applications
Custom Web Applications
Migrating a Database from Another Host
Migrating a Database from Another Host
.sql file from your old host (using phpMyAdmin or a command-line tool), create a new database and user in the FREAKHOSTING panel, then import the .sql file through phpMyAdmin.Best Practices
One Database Per Application
Use Strong Passwords
Back Up Regularly
Limit User Privileges
Troubleshooting
Having trouble connecting? Here are the most common issues and how to fix them:Error: Access denied for user
Error: Access denied for user
fh_wpadmin, not just wpadmin) and that the password matches exactly, including capitalization and special characters. If unsure, reset the password from the Databases page.Error: Can't connect to MySQL server
Error: Can't connect to MySQL server
localhost instead of the actual MySQL IPv4 address. Go to your dashboard, find the MySQL IPv4 Address in the At a Glance panel, and use that IP address as your database host.Error: Unknown database
Error: Unknown database
wordpress and fh_wordpress are different names.My app installed but the site shows a database connection error
My app installed but the site shows a database connection error
Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com