A .sql file is a text export of a database: its tables, structure and data. You'll use one when you restore a backup or move a website from another host.
phpMyAdmin, which is built into StackCP, lets you import it in a few clicks.
Before you start
- Create the database you want to import into first (MySQL Databases in StackCP). Importing into an empty database avoids conflicts.
- If you're replacing an existing database, export a copy of it first so you can go back.
- phpMyAdmin also accepts compressed exports such as
.sql.gzor.zip, which upload faster.
Import the file
- Log in to your FimuroHost client area, open Services and select your hosting plan.
- Click Login to Control Panel / StackCP. StackCP opens with the tools for that website (single sign-on, so there is no second password to type).
- Click phpMyAdmin.
- In the left-hand sidebar, click the database you want to import into.
- Open the Import tab at the top of the page.
- Click Choose File and select the
.sqlfile on your computer. - Leave the other options at their defaults and click Go (on some versions the button is labelled Import).
When it finishes, phpMyAdmin shows a green success message and the imported tables appear in the sidebar.
Common problems
- #1044 Access denied … CREATE DATABASE: the export includes a
CREATE DATABASEorUSEline. Open the file in a text editor, delete those lines, and import again into the database you selected. - #1050 Table already exists: the database already has tables with the same names. Import into a fresh database, or drop the old tables first (after taking a backup).
- #1273 Unknown collation 'utf8mb4_0900_ai_ci': the file came from a MySQL 8 server. Find and replace
utf8mb4_0900_ai_ciwithutf8mb4_unicode_ciin the file, then import again. - The upload fails or times out: compress the file, or split a very large export into smaller parts. If it's still too big, open a ticket. Free website migration is included, and we can import it for you.
After importing a WordPress database
Check that wp-config.php uses the new database name, username, password and the StackCP database hostname (not localhost). If the domain has changed, update the site URL as well.
Need help?
If something doesn't work as described, open a support ticket from your client area or message us on WhatsApp at 01818160926. Tell us the domain name and what you have already tried, and we'll take it from there.
Categories
Written by
FimuroHost Team
Technical Writer