What does a website database do?
A database stores structured information used by a website or application. WordPress stores posts, pages, settings and users in a database, while images, themes and plugins are usually files. MySQL and MariaDB are common relational database systems; availability depends on your hosting plan.
Database, user and password
- Database: stores the site's data.
- Database user: an account permitted to access it.
- Password: authenticates that user.
Your application needs the correct database name, username, password and server hostname. Some providers add an account prefix to database names and usernames.
Create and configure a database
- Open the database section of your hosting panel.
- Create a database and a dedicated user, if supported.
- Grant only the permissions the application needs.
- Enter the connection details in the application configuration.
- Back up existing data before importing, deleting or changing it.
Some panels require you to assign the user to the database separately. Creating a user alone may not grant access.
Management tools and common errors
Your provider may offer phpMyAdmin to view tables, run SQL queries, and import or export data. Use it carefully: destructive queries or incorrect imports can damage the site or overwrite data.
- Access denied: check username, password and privileges.
- Unknown database: check the database name and prefix.
- Connection refused or timed out: verify hostname and remote access settings.
- Website database error: confirm application settings and service status.
Never share database passwords. For support, provide the exact error and application name with secrets removed.