Database Management
The Hepsia Control Panel gives you a powerful and straightforward way to manage your databases. You can create MySQL or PostgreSQL databases in just a few steps, then manage them using the phpMyAdmin and phpPgAdmin tools included with your hosting account.
A Simple Way to Manage Databases
Creating a new database takes only a moment. Enter its name and the Database Manager does the rest. You can see all of your databases together with their sizes, change passwords, create backups, and access phpMyAdmin or phpPgAdmin whenever you need to work directly with your database.
Quick Database Backups
A recent backup can make a big difference when something goes wrong with a website. The Database Manager makes this easy. Click the Backup button beside the database you want to save, and you will be taken to the File Manager, where you can download the backup file you have just created.
MySQL and PostgreSQL Databases
The number of MySQL and PostgreSQL databases available to you depends on the hosting package you choose. MySQL is widely used for websites and applications, while PostgreSQL offers a powerful alternative with advanced database capabilities. You can manage MySQL databases through phpMyAdmin and PostgreSQL databases through phpPgAdmin.
InnoDB Database Support
InnoDB is the standard transactional storage engine for MySQL and is designed to provide reliable data handling, good performance, and support for multiple users working at the same time. When creating a table in phpMyAdmin, you can select InnoDB from the available database engines.
Additional Features
The Hepsia Database Manager also provides useful statistics for your databases, including the number of requests made each hour. This information helps you see how much activity and server load your databases are generating over time.
| SHARED HOSTING | KVM VPS | OPENVZ VPS | SEMI-DEDICATED PLANS | DEDICATED SERVERS |
| Unlimited storage | 80 GB storage | 80 GB storage | Unlimited storage | 480 GB storage |
| Unlimited bandwidth | 4 TB bandwidth | 3 TB bandwidth | Unlimited bandwidth | 10 TB bandwidth |
| 1 website hosted | Unlimited websites hosted | Unlimited websites hosted | Unlimited websites hosted | Unlimited websites hosted |
| 30-Day Free Trial | 24/7/365 support | 24/7/365 support | 30-Day Free Trial | 24/7/365 support |
| start from $4.95/mo | start from $24.00/mo | start from $24.00/mo | start from $19.95/mo | start from $63.00/mo |
FAQ
This FAQ looks at the information that websites keep behind the scenes and the systems used to handle it. It explains what those systems do, how a web page gets information from them, which types are common, what can affect speed, and how to deal with backups, security, and common problems.
FAQ menu
- 1. Getting to Know the Basics
- 2. How a Website Uses Stored Information
- 3. Choosing a Database System
- 4. Speed and Performance
- 5. Security and Backups
- 6. Management and Troubleshooting
1. Getting to Know the Basics
1. What is a database on a website?
It is the place where a website keeps information it needs to remember. A blog may store posts and authors. An online store may keep products, customers, and orders. A membership site has account information to look after. Instead of keeping all of this in random files, the system puts it somewhere organized so it can find the right information when the site asks for it.
2. Does every website need a database?
No. A site made from simple, fixed HTML pages can run quite happily without one. Things change once the website needs to remember information and show different information to different visitors. A shopping cart, login system, forum, or content management system is a good example of where stored records become useful.
3. What is the database used for?
Mostly, it remembers things for the website. Someone publishes a new article, creates an account, places an order, changes a profile, or updates a product price, and the relevant information has to be kept somewhere. The database is often that “somewhere.”
4. Is the database the whole website?
No. This causes confusion quite often. The website also has files such as images, CSS, JavaScript, templates, and other program files. Some of those files work with information stored in the database, but they are not stored there themselves.
5. What is a database table?
A table is a section used to hold one particular kind of information. Picture a filing cabinet with several drawers. One drawer might be for customers and another for orders. In a similar way, an online store could have one table for customers, one for orders, and one for products.
6. What is a row?
One row is one record. In a customer table, one row could represent Richard, another could represent Susan, and another could represent Michael. Each row contains the information belonging to that particular record.
7. What is a column?
A column tells the system what sort of information belongs there. A customer table might have columns for name, email address, registration date, and account status. Every customer then has a value in those columns.
8. Is a table like a spreadsheet?
In a very loose sense, yes. Both use rows and columns, so a spreadsheet is a handy way to picture what a table looks like. The important difference is that a database table is designed for software to work with efficiently, especially when there are large numbers of records and many requests happening at once.
9. What is a database server?
It is the software that handles the requests coming from the website. When the site needs information, it asks the server for it. The server finds the records and sends the result back. In a hosting environment, the server may be running on the same physical machine as the website or somewhere else.
10. What is SQL?
SQL is a language commonly used for working with relational databases. It lets software ask for information and make changes to stored records. For example, an application can use SQL to find a customer's order, add a new post, or change the price of a product.
Back to FAQ menu2. How a Website Uses Stored Information
11. How does a website connect to a database?
The application has connection details telling it where the system is and which account it should use. Depending on the setup, those details can include the server name, database name, username, password, and port. Once the connection works, the application can start sending requests.
12. What happens when I open a page on a database-driven website?
The page you see may not have existed as a finished page a second earlier. The application can first collect the information it needs, such as a post title, article text, price, or user details. It then puts everything together and sends the finished result to your browser. From your side, it looks like you simply opened a web page.
13. What is a query?
A query is a request sent to the database. Sometimes the website is asking for information. Sometimes it is telling the system to save or change something. “Find this product” and “save this new order” are both examples of queries, even though they do different jobs.
14. What does CRUD mean?
You will sometimes see developers use the word CRUD. It stands for Create, Read, Update, and Delete. Those four operations describe most routine work with stored records. Creating a user account, reading an article, changing an address, and deleting an old record all fit into one of those four categories.
15. How does WordPress use a database?
WordPress relies heavily on one. Posts, pages, users, comments, settings, and many other pieces of site information are stored there. When you edit something in the WordPress dashboard, the software changes the relevant records. When a visitor opens the page, WordPress reads those records again.
16. Are WordPress images stored in the database?
Usually, no. The actual image files are normally kept in the website's file storage. WordPress does keep information about those files in its database, though, which is why both the files and the database matter when you are making a complete backup.
17. Are website passwords stored there?
User account information is normally stored there, but a properly designed system should not keep the actual password as readable text. Instead, it stores a password hash. That gives the software a way to check a password without simply keeping a plain copy of it.
18. What happens when somebody submits a form?
That depends on what the form is for. A contact form might send the message by email or save it in some other place. A registration form may create a new user record. An order form can add several records related to the customer, the order, and the products involved. The important part is that the website decides what needs to be stored and then sends the appropriate information to the system handling it.
19. Can one page use information from several tables?
Yes, and that happens all the time. An order page, for example, may need the customer's details, the order information, and the products included in that order. Those pieces can be kept separately and brought together when the application needs them.
20. What happens if the website cannot connect?
The site will usually have trouble producing the page because it cannot get the information it needs. You might see an error message, a blank page, or a partially loaded site. The wording depends on the software. The cause might be as simple as a wrong password or as serious as a server failure.
Back to FAQ menu3. Choosing a Database System
21. Which database systems are common on websites?
MySQL, MariaDB, and PostgreSQL are three names you will come across often. Microsoft SQL Server is another established option, particularly in environments built around Microsoft technologies. There are also NoSQL systems, which organize information differently. What matters is choosing one that fits the application rather than choosing the name that happens to be most familiar.
22. What is a relational database?
A relational system stores information in tables and lets those tables be connected. Think of a store again. You do not necessarily need the customer's name copied into every order record. The order can point to the customer, while the customer information stays in its own table. That is one of the main ideas behind the relational model.
23. What is a NoSQL database?
NoSQL is not one particular product. It is a broad group of systems that use other ways of organizing information. Some work with documents, some with key-value pairs, and some use other structures. They can be very useful for particular applications, but they are not automatically a better choice than a relational system.
24. Is MySQL still a good choice?
Yes. It has been a major part of web development for a long time and is supported by a large amount of hosting and website software. For many everyday sites, there is no need to look for something more exotic.
25. What is MariaDB?
MariaDB is a separate relational database project that started as a fork of MySQL. There are many similarities between them, which is why you will sometimes see both offered by hosting companies. They are not identical, though, so compatibility depends on the software and versions involved.
26. What about PostgreSQL?
PostgreSQL is another relational system and is a strong choice for applications that need advanced features or more complex work with stored information. It is widely used in web applications and is not limited to specialist or unusual projects.
27. Which one should I choose?
Start with the software you want to run. If the application recommends or requires a particular system, that normally settles the question. After that, hosting support, performance requirements, the developer's experience, and the application's design can influence the decision. There is no universal “best” choice.
28. Can I switch from MySQL to PostgreSQL?
Yes, but do not expect it to be a simple swap. The information may need to be converted, and parts of the application may rely on features or SQL behavior that differs between the two. A migration can be perfectly possible, but it should be treated as a real technical job.
29. Can my hosting company restrict which system I can use?
Yes. Shared hosting plans commonly offer a defined set of services, and you normally cannot install whatever you like. With a VPS or dedicated server, you generally have much more freedom. Even then, the application itself may restrict your choices.
30. Does every website have its own database?
Not necessarily. Several separate websites can exist on the same hosting account, with each using its own database. The opposite can also happen: one application can use several databases. There is no rule saying one website must always equal one database.
Back to FAQ menu4. Speed and Performance
31. Does a large database automatically mean a slow website?
No. Size alone tells you very little about how quickly a site will run. A large system can perform perfectly well when the tables, queries, indexes, and server resources are appropriate. A small one can be painfully slow if the application is badly written.
32. What is an index?
Think about a book. If you want to find every mention of a particular subject, you could turn every page until you find them, but using the index is much quicker. A database index works on roughly the same idea. It gives the system a faster way to locate certain records.
33. Can too many queries slow down a site?
They can. Every request takes some processing, and a badly designed page may ask for the same information again and again. That does not mean “fewer queries is always better,” because one complex request can also be expensive. What matters is doing the necessary work efficiently.
34. What does optimization mean here?
It means finding ways to make the system do its work with less unnecessary effort. Sometimes the answer is a better query. Sometimes an index helps. In another case, the application may be doing something over and over that only needs to be done once. There is no single optimization trick that fixes every problem.
35. Can too much stored information become a problem?
It can, although again, there is no magic size at which a website suddenly becomes slow. Very large tables may take more time to search or maintain, especially when they have poor structure or inefficient queries. There can also be a simpler problem: you may eventually run out of storage.
36. Can a database run out of storage?
Yes. A hosting account has a limited amount of disk space unless the plan says otherwise. Orders, logs, user records, posts, sessions, and other information can keep accumulating. Once storage becomes tight, other parts of the website can suffer too.
37. What happens when traffic suddenly increases?
The website has more work to do because more visitors are making requests at the same time. If many of those requests need stored information, the extra load reaches the database server as well. A site that was fine at low traffic can therefore start struggling when its audience grows sharply.
38. Does caching reduce database work?
Often, yes. Instead of asking for the same result repeatedly, the website can temporarily keep a copy and reuse it. That means some requests never need to reach the database at all. Caching is one reason a busy site can sometimes handle far more visitors than you might expect from the underlying hardware alone.
39. Should old records be deleted to make things faster?
Only when there is a good reason. Some old records are useless leftovers, while others may be needed for accounting, customer history, reporting, or the normal operation of the application. Deleting things simply because they look old can create a bigger problem than the one you were trying to solve.
40. How can I tell whether the database is causing a slow website?
Look at evidence rather than guessing. Server monitoring, application logs, query analysis, and performance tools can show where the time is going. A slow image, a heavy plugin, a poorly written script, or a hosting problem can easily be mistaken for a database problem.
Back to FAQ menu5. Security and Backups
41. Why should website owners care about database security?
Because the information sitting there can be extremely valuable. Depending on the site, it may include customer records, orders, account details, internal settings, or other information that should not fall into the wrong hands. Someone who gets unauthorized access may be able to read, alter, or delete it.
42. What is SQL injection?
This is a way of attacking a website by getting it to treat malicious input as part of a database command. A vulnerable application might take something supplied by a visitor and place it directly into a query when it should not. Good development practices, including parameterized queries, are used to prevent this.
43. Should visitors be able to connect directly to the database?
Normally, no. There is usually no reason for an ordinary website visitor to have a direct connection to the system holding the records. A common setup keeps that service protected while allowing the website application to communicate with it behind the scenes.
44. Are database login details important?
Very much so. They should be treated like any other sensitive login credentials. If somebody gets them, they may be able to access the records without going through the normal website login at all. Leaving those details in a public file or accidentally posting them online can therefore be serious.
45. How often should I make a backup?
There is no useful answer such as “once a week” that applies to every site. Think about how much work you are prepared to lose. If a store receives orders all day, losing a week's worth of records would be unacceptable. A small site that changes once in a while has very different needs.
46. Do I need to back up the website files too?
Yes. The database and the website files are usually two halves of the same system. Imagine restoring all your WordPress posts but none of the WordPress files, themes, plugins, or uploaded images. You would have plenty of information, but not a complete working website.
47. Why keep more than one backup?
Because backups can fail too. A file may be damaged, deleted by mistake, overwritten, or stored on the same server that has just gone down. Having several copies gives you somewhere else to turn if one copy is not available.
48. Should backups be stored somewhere other than the website's server?
For important sites, that is a sensible precaution. A backup sitting on the same server as the live site is not much help if that entire server becomes unavailable or is compromised. Keeping another copy elsewhere separates the backup from the original problem.
49. Is making a backup enough, or should I test it?
Test it. Otherwise you are trusting a file you have never actually used to restore the site. An import may fail, a backup may be incomplete, or something important may have been left out. Finding that out during an emergency is a particularly bad time to discover it.
50. Can a hosting company restore my database?
Possibly, but do not assume they can restore exactly what you need. Backup policies differ between hosting companies and plans. Some providers keep several copies, some keep them for a limited period, and some recovery options may cost extra. Your host's actual policy is more useful than a general promise that “backups are included.”
Back to FAQ menu6. Management and Troubleshooting
51. What is phpMyAdmin?
phpMyAdmin is a web-based tool commonly offered by hosting companies for working with MySQL and compatible systems. Instead of typing every command from a terminal, you can use its interface to look at tables, run SQL, import or export information, and make certain changes.
52. Can I change records manually?
Yes, but this is one of those jobs where a little confidence can be dangerous. A direct edit can fix a small problem, but the wrong value in the wrong field can also cause unexpected trouble. Before changing anything important, make a backup and make sure you understand what the record controls.
53. What does importing a database mean?
It means taking information from a file and putting it into a database. You may need to do this after moving a website, restoring a backup, or setting up a copy of an existing site. An SQL file is one of the most common formats used for this job.
54. What does exporting one mean?
Exporting creates a file containing selected stored information. That file can then be kept as a backup or moved to another server. In everyday website administration, importing and exporting often go together when a site is being moved or restored.
55. What is a database migration?
Migration is simply the process of moving the stored information from one setup to another. Moving a website to a new hosting company is a common example. A migration can sound simple until you discover that the new environment uses different versions, settings, or software, which is why careful testing matters.
56. Why might a large SQL file fail to import?
The file itself may be completely fine. A web-based import tool can be restricted by maximum upload size, memory limits, or the amount of time a script is allowed to run. A large import can hit one of those limits and stop before the job is finished.
57. What does repairing a table do?
On systems that support table repair, the operation is intended to deal with certain forms of damage or inconsistency. It is useful in the right situation, but it is not a universal “fix my database” button. If important information is involved, make a backup before trying repair operations.
58. Why does my website say “Error establishing a database connection”?
That message tells you the application cannot establish the connection it expects, but it does not tell you exactly why. The username or password could be wrong. The service could be unavailable. The hosting account might have reached a resource limit. There could also be a problem with the stored information itself. The hosting logs and the application's configuration are good places to start looking.
59. Can I delete tables that I do not recognize?
Please do not treat unfamiliar names as spare parts. WordPress plugins and other applications often create their own tables, and their names may not be obvious at all. Removing one that is still being used can break a feature or cause much bigger problems. Find out what created the table first.
60. When is it better to get professional help?
There is a point where experimenting stops being sensible. A site containing important customer records is not a good place to learn by trial and error. The same applies to a failed migration, serious corruption, or a suspected security breach. When one wrong command could make the situation worse, having somebody experienced handle it can save a great deal of trouble.
Back to FAQ menu