A database is where your website stores its content and settings: posts, products, orders, users. WordPress, Joomla, online stores and other systems do not work without a database. This article covers the basics and the principles of using databases safely.
How it works
- A database and a database user are two separate things. The user with its password is the “key” the website uses to access the database.
- The user must be added to the database and given privileges.
- Your cPanel username is added automatically at the start of database and user names, for example cpaneluser_shop.
- The website connects to the database on the same server – the address is localhost.
Principles of safe use
- One database and one database user per website. If one website is hacked, the other databases stay safe.
- Give the database user a long, random password (use “Password Generator”). Only the website's configuration file needs to know this password; you do not have to remember it.
- Grant only the privileges that are needed. A normal website needs “ALL PRIVILEGES” on its own database only; for reports or external tools, “SELECT” (read only) is enough.
- Do not enable remote access for everyone (“%”). If you need it, allow only a specific IP address and remove it when you are done.
- Make a copy before major changes (updates, importing, editing in phpMyAdmin).
- Delete unused databases and users – for example after test installations.
- Do not install a separate phpMyAdmin – it is already in cPanel (see the article “phpMyAdmin – how to open your databases in cPanel”).
Limits worth knowing
- Name length is limited and depends on the length of your cPanel username – cPanel shows the remaining number next to the field (for example “54 characters max.”).
- File size for importing in phpMyAdmin – up to 1024 MiB.
1Where to manage databases
Log in to cPanel – see the article “1.2. Logging in to cPanel”. In the “Databases” section of cPanel, open “Manage My Databases”. Here you can create databases, check them and manage users.

Guides
- “How to create a new database (Database Wizard)”
- “How to connect to a MySQL database – connection details”
- “Database users: privileges and changing the password”
- “Checking and repairing a database (Check / Repair)”
- “Exporting and importing a database with phpMyAdmin”
- “Remote access to a database (Remote Database Access)”
- “Renaming and deleting a database”
If you run into any difficulties, just write to us and we will help. support@area.lv