On this page
The database is the part most site owners fear, and that fear is understandable: you can upload files again, but the database holds all your posts, orders, customers and settings, and a single mistake in it may not be reversible. But working with it on shared hosting isn't as complicated as it seems — it is a specific set of steps that repeat: create, link, browse, export, import. This guide explains the tool itself and how to use it safely, not a performance optimization strategy (there are two separate articles for that, which we will point to where relevant).
What does the database actually store, and when do you need to open it?
Your site is built from two halves and only two: files and a database. The files are what you upload through the file manager or an FTP program such as FileZilla — the WordPress core, themes, plugins, uploaded images. The database is the moving content: post text, comments, user accounts, every plugin's settings, store orders, shopping carts, and even your site's address itself.
The practical difference between the two halves matters a great deal in a crisis. If you delete a file from your theme, you can download a clean copy of the theme and replace it in a minute. But if you delete a table from the database, there is no "original source" to download your content from — either you have a backup, or the content is gone for good. That is the whole equation, and it is why every piece of advice in this article comes back to the same sentence: export first.
Do you really need to open phpMyAdmin?
The honest answer: in day-to-day use, no. WordPress and other platforms manage their own databases, and you work with the dashboard, not with the tables. But there are specific situations where the tool becomes a necessity rather than a luxury, and most of them are emergencies where you need to come in through the "back door" because the front door is locked.
| Situation | Do you need phpMyAdmin? | Better alternative, if any |
|---|---|---|
| Installing a new site manually | Yes — to create the database and user first | The auto-installer in the panel |
| Taking a quick backup before a major update | Yes — a quick export in SQL format | A scheduled backup plugin |
| Moving the site to a new host | Yes — export, then import | A full-featured migration plugin |
| You forgot the admin password and the reset email doesn't arrive | Yes — edit the user's row | Reset via email |
| An error that blocks access to the dashboard entirely | Yes — disable a plugin from the table | None if the dashboard is down |
| Changing the site address after a domain change | Yes — very carefully | A dedicated plugin or the command line |
| Cleaning up old revisions and speeding up the site | Preferably not | A dedicated cleanup plugin |
| Deleting a post or editing its text | Absolutely not | The site's dashboard |
The golden rule: if you can do something from your site's dashboard, do it there. The dashboard knows how to update related tables together, while a manual edit changes a single row and leaves the other tables in their old state, creating orphaned or contradictory data. Go into phpMyAdmin when you actually need it, do what you came for, then get out.
What is the difference between the "MySQL Databases" tool and phpMyAdmin?
This is the point that confuses beginners the most, and the source of many mistakes. The two tools appear side by side in the "Databases" section of your hosting panel, and many people think they are two faces of the same thing. In fact, they work at two completely different levels.
The "MySQL Databases" tool is an administrative tool that belongs to the hosting panel. Its job is to create the containers and the accounts: it creates the database itself, creates database users, links them together with privileges, and deletes any of them. It knows nothing about the contents of the tables and doesn't show them to you, but it has administrative privileges at the account level.
phpMyAdmin is a graphical interface for working with the contents of a database. When you open it, you see the tables, rows and columns; you browse and edit data, run SQL queries, and export and import. But on shared hosting it logs in with your account's privileges only, which is why you usually can't create new database users from inside it — the "Privileges" tab appears for those with administrative privileges on the MySQL server, and that isn't your situation on shared hosting.
| Aspect | The "MySQL Databases" tool | phpMyAdmin |
|---|---|---|
| Creating a database | Yes — the right way | Sometimes, but not the standard way |
| Creating a database user | Yes — practically the only way | No (usually disabled on shared hosting) |
| Linking a user to a database and granting privileges | Yes | No (usually) |
| Viewing tables and data | No | Yes — its core function |
| Running SQL queries | No | Yes |
| Exporting and importing a copy | No | Yes |
| Repairing a corrupted table | No | Yes |
How do you create a database and a user and link them?
Now to the implementation. We will use the "MySQL Databases" tool in your hosting panel (known in cPanel as MySQL Databases, and found in CyberPanel, Plesk and others under similar names in the databases section). The steps are almost the same in every panel, even if the labels differ slightly.
Step one: create the database
Open the tool, and at the top of the page you will find a field for the new database name. Type a clear name that indicates its purpose — if you manage several sites on the same account, a name such as blog or shop is much better than db1 six months from now, when you have forgotten which is for which site. Use only Latin letters, numbers and underscores, and avoid spaces, symbols and Arabic characters.
Click the create button, and a success message will appear with the database's full name. Copy this full name rather than relying on what you typed — we will explain why shortly.
Step two: create a database user
Scroll down on the same page to the "MySQL Users" section. Here you create an account that is completely separate from your hosting panel account and from the site's admin account. This user's only job is to connect to the database on behalf of the site, and you will never log in anywhere with it yourself.
Type the username, then a password. Don't bother inventing a password you can remember — use the panel's built-in generator and make it long and random, because the site, not you, will store it in the configuration file. Save it in your password manager right away before leaving the page, because most panels won't show it to you again.
Step three: link the user to the database and grant privileges
This is the decisive step without which the site can't work. Scroll down to the "Add User To Database" section, choose the user you just created from the first list and the database you created from the second list, then click the add button.
The panel will take you to the privileges screen. For a single site that uses the whole database — the case for WordPress and most platforms — choose ALL PRIVILEGES, then save. The reason is practical: WordPress needs to read, write and modify data, and it also needs to create new tables when installing plugins and change their structure during updates. Withholding a single privilege can make a plugin fail to install silently, and then you spend hours looking for the cause.
| Step | Where you do it | What you get | Common mistake |
|---|---|---|---|
| 1. Create the database | The MySQL Databases tool | An empty container with a full, prefixed name | Using a name with spaces or symbols |
| 2. Create the user | The same section, lower on the page | A connection account with a password | A weak or unsaved password |
| 3. Link + privileges | "Add User To Database" | A working connection between the two | Skipping the step entirely |
| 4. Save the details | A password manager | The full names and the password | Copying the short name instead of the full one |
Why does a strange name appear in front of what you typed?
You probably noticed that what appeared after creation isn't what you typed. You typed blog, and user_blog appeared. This isn't an error — hosts automatically add the hosting account name as a prefix to every database name and every username you create. The reason is that a single MySQL server serves hundreds of accounts, and the prefix ensures your database name doesn't clash with your neighbor's database name on the same server.
This prefix is the number one cause of connection failures on manually installed sites. The user writes the name they typed (blog) in the configuration file instead of the real name (user_blog), so the server refuses to connect to a database that doesn't exist. The practical rule: copy the full name exactly from the panel screen, and never type it from memory. The same applies to the username.
Also note that some panels set a maximum length for the username that includes the prefix. If you type a long name, its end may be cut off, so what you think is the username differs from what is actually registered. Always check the final list on the page after creating it.
What do the privileges you grant mean?
We chose ALL PRIVILEGES because it is the practical option for a complete site, but it is good to understand what you have granted. If you later want to set up a user with limited privileges — for an analytics tool that reads but doesn't write, for example — this table is your reference.
| Privilege | What it allows | Does a WordPress site need it? |
|---|---|---|
| SELECT | Reading data from tables | Yes — essential |
| INSERT | Adding new rows | Yes — for every post or comment |
| UPDATE | Modifying existing rows | Yes — for every save or update |
| DELETE | Deleting rows | Yes — to delete content |
| CREATE | Creating new tables | Yes — when installing plugins |
| ALTER | Changing table structure | Yes — during updates |
| DROP | Dropping entire tables | Yes — when removing plugins |
| INDEX | Creating and dropping indexes | Yes — for performance |
| CREATE TEMPORARY TABLES | Temporary tables for queries | Useful for some plugins |
| LOCK TABLES | Locking tables during operations | Useful for backup tools |
How do you connect the site to the database?
Now that the database and user are ready and linked, all that is left is to tell the site about them. In WordPress this happens in the wp-config.php file in the site's root folder, which contains four essential constants:
define( 'DB_NAME', 'user_blog' );
define( 'DB_USER', 'user_bloguser' );
define( 'DB_PASSWORD', 'the-password-you-saved' );
define( 'DB_HOST', 'localhost' );| Constant | What it holds | Where to get it |
|---|---|---|
| DB_NAME | The full database name, with the prefix | The panel screen after creation |
| DB_USER | The full username, with the prefix | The user list in the panel |
| DB_PASSWORD | The user's password | What you saved at creation time |
| DB_HOST | The database server address | localhost on most shared hosting |
The last value needs some explanation. On shared hosting, the database server is on the same machine that hosts your files, which is why the value is localhost in the vast majority of cases. But some hosts separate the database server from the web server for performance reasons, in which case the value is a different address or name that the host provides. Don't guess this value — if localhost doesn't work, ask support directly instead of trying random addresses.
When you install WordPress via the auto-installer in the panel, all of these steps are done for you: the database, the user, the link and the configuration file. The need to do it manually arises with manual installations and when moving a site between hosts.
How do you find your way around phpMyAdmin?
Open phpMyAdmin from the databases section of your panel. On shared hosting, the panel link logs you in automatically without asking for separate credentials, because the panel passes your identity to the tool.
What you will see is a two-column interface. The sidebar shows the databases your account has privileges on, and clicking a database name expands its tables. The main area shows the details of whatever you selected, topped by a bar of tabs whose options change depending on whether you are on an entire database or on a specific table.
This contextual change is confusing at first, but it is logical: when you are on a database, the tabs concern the whole database (all its tables, a full export, a full import). When you are on a table, the tabs concern that table alone. The common mistake here is for a user to think they exported their entire database when they were actually on a single table, so they get an incomplete copy that they discover at the worst possible moment.
| Tab | What it does | When to use it |
|---|---|---|
| Browse | Shows the table's rows and lets you edit them | To see the actual data |
| Structure | The table's columns, their types and its indexes | To understand how the table is built |
| SQL | Runs a manually written query | For a precise or bulk operation |
| Search | Searches a table or database by criteria | To find a specific row |
| Insert | Adds a new row manually | Rarely, for special cases |
| Export | Downloads a copy of the database or table | Before any change, and for backups |
| Import | Uploads an SQL file and runs it | For restoring or migrating |
| Operations | Rename, sort, maintenance, delete | For table-level operations |
| Privileges | Managing users | Usually unavailable on shared hosting |
Browsing and editing data
Click a table name in the sidebar and you are taken straight to a view of its rows. The rows are shown in pages because tables can contain tens of thousands of rows, and next to each row are links to edit, copy and delete it.
When you click "Edit," a screen opens showing the row's columns in editable fields. Change what you want, then save. You will notice that phpMyAdmin shows you the SQL query it ran — usually an update to a single row. This habit is educational: every time you perform a graphical operation, look at the resulting query to understand what actually happened.
Note an important technical point: graphical editing changes only the row you selected. If other tables refer to this row by its ID, they won't be updated automatically. That is another reason to avoid manual editing when the site's dashboard is enough.
Running an SQL query
The SQL tab gives you a box where you type a query and click "Go." This is the most powerful and the most dangerous part of the tool at the same time, because the query runs on every matching row in one go.
The golden rule that protects you: test with SELECT before you run UPDATE or DELETE. First write a read query with the same condition, and see how many rows it returns. If it returns three rows and you expect three, run the change with the same condition confidently. And if it returns a thousand when you expect three, that single line has saved you from disaster.
SELECT * FROM wp_options WHERE option_name = 'siteurl';Which WordPress tables will you see?
When you open a WordPress site's database, you will find twelve default tables, along with extra tables created by plugins. They all start with a common prefix, wp_ by default, but it can be changed during installation, and many installers choose a random prefix for security reasons. If you see your tables starting with something like xk29b_, that is perfectly normal, and you must use your actual prefix in any query you write.
| Table | What it stores | Sensitivity |
|---|---|---|
| wp_posts | Posts, pages, attachments and menu items | High — the heart of the content |
| wp_postmeta | Extra data attached to each post (custom fields) | High |
| wp_options | Site and plugin settings, including siteurl and home | Extremely critical |
| wp_users | User accounts and hashed passwords | Critical |
| wp_usermeta | Additional user data, roles and capabilities | Critical |
| wp_comments | Comments and their authors' details | Medium |
| wp_commentmeta | Extra data for comments | Low |
| wp_terms | Categories and tags | Medium |
| wp_term_taxonomy | Each term's type and hierarchy | Medium |
| wp_term_relationships | Links posts to categories and tags | Medium |
| wp_termmeta | Extra data for terms | Low |
| wp_links | Links (an old, rarely used feature) | Low |
wp_options: the table that can stop your site with a single row
This table is your site's stored control panel. It holds the site name and tagline, permalink settings, the settings of every installed plugin and the list of active plugins. But the most dangerous things in it are two rows: siteurl and home.
siteurl is the address where WordPress knows its files are located, and home is the address visitors see in their browser. If you change either one to a wrong value — an extra character, the wrong protocol, a misplaced slash — you can lose access to the dashboard entirely. The cruel irony is that you won't be able to fix it from the dashboard, because the dashboard itself can no longer be opened, and the only way back will be phpMyAdmin again or editing the configuration file.
This particular edit comes up when you change the domain or move from HTTP to HTTPS. If you plan to move your entire site, the safe path is described in the guide to migrating WordPress without downtime, which includes steps that protect these two rows. And if you end up with a white screen after the edit, the only way out is to restore the correct value from phpMyAdmin itself or force it temporarily from the configuration file — which is why an export taken before the edit is the difference between a few minutes of quick repair and a long night.
Why does a manual "search and replace" corrupt your data?
This is one of the points that costs site owners real losses, and its cause isn't intuitive at all.
WordPress doesn't store everything as plain text. Many settings — theme options, widget settings, advanced plugin fields — are stored in a serialized format, which saves a whole array inside a single text field. The heart of the problem is that this format stores the length of each string next to it. If the stored string sits in a spot marked as seventeen characters long, any replacement that makes it eighteen characters without updating the number makes the entire structure unreadable.
The practical result is that a single table-wide replace query can wipe out your theme, widget and plugin settings in one go, without a clear error message — you find out when your home page is blank or the menu has disappeared. Worse, the damage doesn't necessarily show up immediately; a week may pass before you notice a missing setting.
So the rule is: never run a manual search-and-replace on a WordPress database. Use a tool that understands the serialized format — a plugin built for the purpose, or WordPress's official command-line tool — because it unserializes the data, replaces, and then reserializes it with the correct lengths. Acceptable manual edits in phpMyAdmin are limited to simple, well-known text rows such as siteurl and home.
How do you export a backup of your database?
Exporting is the most important thing to learn in phpMyAdmin, and the thing people use least. In practice: before any change, however simple it seems, go to the Export tab and take a copy. It takes less than a minute on a medium-sized database and saves you what can't be replaced.
Select the database name in the sidebar (not a table), then open the Export tab. You will find two methods.
| Comparison | Quick | Custom |
|---|---|---|
| Number of options | Almost no options | Full, detailed options |
| What is exported | The entire database with default settings | Whichever tables you choose |
| Structure and data | Both together | You can choose one of them |
| Compression | No compression | zip, gzip or bzip2 |
| File name | Default | Customizable |
| When to use it | A quick copy before a change | A large database or a selective export |
SQL is your default format in both cases, and you shouldn't change it without a clear reason. The resulting file isn't raw data but a series of commands that rebuild the entire database when run: creating the tables, then inserting all the rows. Other formats (CSV, for example) are useful for moving data into a spreadsheet, but they aren't suitable for restoring a site.
Compression is what saves large databases. SQL files are repetitive text by nature, so they compress extremely well — commonly cited figures suggest they shrink roughly six to ten times with gzip. The benefit is twofold: faster downloads and less storage space, and, more importantly, a compressed file may get past the upload limit when importing, while the raw file fails.
Is an export a substitute for a full backup?
No, and this point must be completely clear. An export gives you only half of the site: the data without the files. If you restored this file onto empty hosting, no site would appear — because there would be no core, no theme and no images.
A full backup needs the files and the database together, from roughly the same moment, and saved off the server, not on it. A manual export is an excellent tool for critical points before making changes, but it can't replace a regular, automated system. For the full picture, see the website backup guide, and for WordPress specifics, the WordPress backup guide.
How do you import and restore a database?
Importing is the reverse of exporting: you upload an SQL file, and the server runs its commands against the current database. You use it in two cases: restoring a copy after a mistake, or moving a site to new hosting.
Before anything else, understand what will happen. An export file usually contains commands that drop the old table before creating it again. In other words, importing over a database that contains data replaces that data with what is in the file. That is what you want when restoring, and disastrous if you import the wrong file over a live database. Check the database name in the sidebar before clicking, especially if you manage several sites.
The steps themselves are simple: select the target database, open the Import tab, choose the file from your computer (it accepts SQL and compressed files), leave the other settings at their defaults in most cases, then run it. Don't close the tab or refresh the page while it runs — it may take minutes on a large database.
Why does importing fail with large files?
This is where most people hit a wall. The large file is rejected, or the process stops midway, and in most cases the cause isn't a corrupted file but the server's limits.
phpMyAdmin is a PHP application, so it is bound by the PHP settings on your hosting. The two most important settings are upload_max_filesize (the maximum size of an uploaded file) and post_max_size (the maximum size of the whole request), joined by max_execution_time, which kills any script that exceeds its time limit. The values of these settings vary from host to host and plan to plan, and there is no standard number you can rely on — but phpMyAdmin usually shows the actual allowed limit next to the file upload field on the import page, so look at it before you try.
| Symptom / error | Likely cause | Fix |
|---|---|---|
| The file is rejected before the upload starts | Its size exceeds the upload limit | Compress it with gzip and try again |
| The upload completes, then the process stops | The script's execution timeout expired | Split the file or use the command line |
| A partial import, then it stops | A timeout or memory limit | Import the tables in batches |
| An SQL syntax error at a specific line | An incomplete file or a truncated export | Export again and make sure it is complete |
| A message that a table already exists | The database isn't empty | Import into a clean database |
| A character encoding error | Different encodings on the two servers | Export and import with the same encoding |
| The import succeeds but the site doesn't work | The old address is still stored | Correct siteurl and home |
There are three ways to handle a large file, ordered from easiest: compress the file with gzip so it shrinks to a fraction of its size and may get past the upload limit right away. Import via the command line if you have SSH access, a path that doesn't go through the web upload limits at all. Ask your host to raise the limit temporarily — most support teams do this within minutes for a one-off migration. A fourth, less obvious option is to split the SQL file into parts and import them in sequence, which is tedious but works.
Basic maintenance inside phpMyAdmin
At the bottom of the table list page, and from the Operations tab at the table level, you will find a set of maintenance actions you can run without writing a single query: Check table to make sure it is sound, Repair table to try to fix corruption, Analyze table to update its statistics, and Optimize table to reclaim space wasted after many deletions and edits.
These actions are useful, but they aren't a performance strategy. Real database optimization is broader work: reducing the volume of data itself, appropriate indexes, an object caching layer, and monitoring slow queries.
Because this is a topic in its own right, we have dedicated two guides to it: Database optimization for the general principles that apply to any site, and Optimizing the WordPress database for the practical application to WordPress specifically. What matters here is knowing where the maintenance buttons are and that they are relatively safe — and making a habit of taking a backup before using them.
How do you protect your database?
Your database contains your customers' data and your users' accounts, and it is a direct target for attackers. Three points cover most of the practical risks.
The user's password must be genuinely strong. The common argument is that this user isn't used for manual logins, so there is no need to make it complex — and that argument is wrong. This password is what stands between your database and anyone who manages to reach the configuration file, through a file upload vulnerability, for example. Make it long and random, don't reuse it across sites, and change it immediately at any hint of a breach.
"Remote MySQL" stays closed by default. This feature in the hosting panel allows connections to your database from outside the server — from a management program on your computer, for example. It is useful when needed and dangerous if opened wide. If you have to enable it, add a specific IP address, not an open range, and close it as soon as your task is done.
Don't leave phpMyAdmin exposed. On shared hosting, the tool is protected behind your panel login, which is good. The problem usually occurs on servers managed by their owners, when a copy of phpMyAdmin is installed at a predictable path such as /phpmyadmin and left open to the internet — a path that attackers' automated tools scan constantly. If you install it yourself, put an extra layer of protection in front of it and keep it up to date.
These layers are part of securing the whole panel, and the broader details are in the guide to securing cPanel.
Frequently asked questions
Can I create a database user from inside phpMyAdmin? On shared hosting, usually not. The Privileges tab appears for those with administrative privileges on the MySQL server, and your shared hosting account doesn't have them. Create the user with the "MySQL Databases" tool in your panel, which is the standard method anyway.
Why does my database have a different name from the one I typed?
Because the host automatically adds your hosting account name as a prefix, to avoid name conflicts between accounts on the same server. You type blog and get user_blog. Copy the full name exactly from the panel screen when you enter it in the configuration file.
What is the difference between dropping a database and emptying it? Dropping (Drop) erases the database or table completely — structure and data together — leaving no trace. Emptying (Empty) deletes all the rows and keeps the table structure empty, ready to receive new data. Both are immediate and irreversible.
Is an export from phpMyAdmin enough as a backup? No. It gives you only the database, without the site's files, and a restore needs both halves. Use it as a point-in-time copy before making changes, and rely on a regular backup system that includes the files and is stored off the server.
Why does importing my database file fail? Usually because its size exceeds the upload limit allowed on your hosting, or because execution exceeded the timeout. Compress the file with gzip first, and if it still fails, import via the command line or ask support to raise the limit temporarily.
What is the correct value for DB_HOST?
In the vast majority of shared hosting cases it is localhost, because the database server is on the same machine. But some hosts separate the two servers and give you a different address. Don't guess — check your panel or ask support.
Can I change my site's address directly in the database?
Yes, through the siteurl and home rows in the wp_options table, but very carefully and after taking a backup. A single-character mistake can lock you out of the dashboard, and fixing it will only be possible from phpMyAdmin again or from the configuration file.
Why is a manual search-and-replace in the WordPress database forbidden? Because many settings are stored in a serialized format that records the length of each string next to it. A direct replacement changes the text without updating the length, so the data becomes unreadable and theme and plugin settings are lost. Use a tool that understands this format.
Is the wp_ prefix mandatory for WordPress tables?
No, it is just the default. Many installers choose a random prefix during installation for security reasons, so you will see your tables starting with something like xk29b_. Use your actual prefix, as you see it in phpMyAdmin, when writing any query.
How many databases do I need for several sites? A separate database for each site, which is the right separation: each site with its own database and user, so a compromised site can't reach its neighbor's data, and you can restore one without touching the rest. The number of databases allowed is set by the hosting plan itself, and some budget plans limit it to a small number — check it before planning several sites on a single account.
When should I use phpMyAdmin, and when should I use a plugin? Use a plugin for everything that is periodic and repetitive: scheduled backups, cleanup, changing URLs. Keep phpMyAdmin for emergencies when the dashboard is broken, for a point-in-time copy before a risky change, and for moving between hosts.
Conclusion
Managing a database isn't a technical talent but a disciplined habit. The order is always the same — database, then user, then linking with privileges — and the automatic prefix is copied exactly, not typed from memory. And inside phpMyAdmin, you know where you are before you click, you read before you write, and you export before you edit.
Start with one thing today: open phpMyAdmin, select your site's database, take a full export and save it on your computer. That habit alone turns every potential future mistake from a disaster into a passing annoyance that lasts a few minutes.
Frequently asked questions
Can I create a database user from inside phpMyAdmin?
On shared hosting, usually not. The Privileges tab appears for those with administrative privileges on the MySQL server, and your shared hosting account doesn't have them. Create the user with the "MySQL Databases" tool in your panel, which is the standard method anyway.
Why does my database have a different name from the one I typed?
Because the host automatically adds your hosting account name as a prefix, to avoid name conflicts between accounts on the same server. You type blog and get user_blog. Copy the full name exactly from the panel screen when you enter it in the configuration file.
What is the difference between dropping a database and emptying it?
Dropping (Drop) erases the database or table completely — structure and data together — leaving no trace. Emptying (Empty) deletes all the rows and keeps the table structure empty, ready to receive new data. Both are immediate and irreversible.
Is an export from phpMyAdmin enough as a backup?
No. It gives you only the database, without the site's files, and a restore needs both halves. Use it as a point-in-time copy before making changes, and rely on a regular backup system that includes the files and is stored off the server.
Why does importing my database file fail?
Usually because its size exceeds the upload limit allowed on your hosting, or because execution exceeded the timeout. Compress the file with gzip first, and if it still fails, import via the command line or ask support to raise the limit temporarily.
What is the correct value for DB_HOST?
In the vast majority of shared hosting cases it is localhost, because the database server is on the same machine. But some hosts separate the two servers and give you a different address. Don't guess — check your panel or ask support.
Can I change my site's address directly in the database?
Yes, through the siteurl and home rows in the wp_options table, but very carefully and after taking a backup. A single-character mistake can lock you out of the dashboard, and fixing it will only be possible from phpMyAdmin again or from the configuration file.
Why is a manual search-and-replace in the WordPress database forbidden?
Because many settings are stored in a serialized format that records the length of each string next to it. A direct replacement changes the text without updating the length, so the data becomes unreadable and theme and plugin settings are lost. Use a tool that understands this format.
Is the wp_ prefix mandatory for WordPress tables?
No, it is just the default. Many installers choose a random prefix during installation for security reasons, so you will see your tables starting with something like xk29b_. Use your actual prefix, as you see it in phpMyAdmin, when writing any query.
How many databases do I need for several sites?
A separate database for each site, which is the right separation: each site with its own database and user, so a compromised site can't reach its neighbor's data, and you can restore one without touching the rest. The number of databases allowed is set by the hosting plan itself, and some budget plans limit it to a small number — check it before planning several sites on a single account.
When should I use phpMyAdmin, and when should I use a plugin?
Use a plugin for everything that is periodic and repetitive: scheduled backups, cleanup, changing URLs. Keep phpMyAdmin for emergencies when the dashboard is broken, for a point-in-time copy before a risky change, and for moving between hosts.