phpMyAdmin can import an SQL backup into a selected database. The file may create, replace or delete tables depending on its statements, so inspect its purpose and take a current backup before importing into an existing application.
IN THIS ARTICLE
What you need before you begin
Create the destination database and authorised user through your hosting panel when needed. Check the dump’s source application, database version, character set and size. For migration, use an empty destination unless the application explicitly supports merging data.
01 Import a database backup with phpMyAdmin
- Open phpMyAdmin from the hosting panel and select the exact destination database in the left navigation.
- Choose Import, select the trusted SQL or supported compressed SQL file, and confirm the format. Do not upload a database dump to a public website folder.
- Review any import options required by the dump’s instructions. Avoid changing character-set or compatibility settings at random to bypass an error.
- Start the import and wait for its final result. If it stops partway, record the first error and treat the database as potentially partially imported.
- Check the resulting tables, then update the application’s database connection only after the destination is ready. Test sign-in, representative records and character display.
02 Example: confirm the selected database before importing
In phpMyAdmin, select the intended destination database and open its SQL tab. These read-only statements confirm the selection and show its current tables. They do not create, clear or repair anything.
SELECT DATABASE() AS selected_database;
SHOW TABLES;
Check the displayed database name against the destination recorded in your migration plan. If it is empty or wrong, stop and select the correct database. Save an export of existing data before using a file that contains statements which replace tables or rows.
After the import, compare the resulting table list and important records with the file's documented expectations. A transactional updater may require tables that already exist, while an installer may create missing structures. Use the file intended for that state and preserve its session requirements instead of deleting more tables to bypass an error.
Confirm the expected result
Compare expected table counts and key records with the source. A green import notice does not prove the application points to the right database or that the dump included every required object.
What should I do when a phpMyAdmin import reaches a limit or fails partway?
For upload or execution limits, use an approved server-side import or ask support rather than repeatedly resuming blindly. SQL scripts requiring session temporary tables or one transaction must remain in one session. Restore the pre-import backup if an existing database was changed incorrectly.