You can import a MySQL or MariaDB database into your Hostek account even if the file size exceeds the phpMyAdmin upload limit. This process uses the command line to bypass web-based limitations.
Before you begin
You will need:
A MySQL or MariaDB database hosted on a Hostek account.
The
.sqlor.sql.gzfile containing your database data.Access to a terminal or command-line interface (such as PuTTY, Termius, or a local terminal).
The database name, the database username, and the database password.
Import the database via command line
Because web-based tools like phpMyAdmin are subject to PHP configuration limits, using the command line is the most reliable way to import large database files.
Connect to your server via SSH or a terminal client.
Navigate to the directory where your database file is located.
Run the following command to import the database:
mysql -u [username] -p [database_name] < [filename.sql]
When prompted, enter the password for the database user.
Wait for the command to complete. If the command finishes and returns you to the command prompt without an error message, the import was successful.
Note: Replace [username] with your database user, [database_name] with the name of the database, and [filename.sql] with the actual name of your file.
Confirm the result
Log in to your Hostek control panel and open phpMyAdmin.
Select the database from the list on the left.
Verify that the tables are present and contain the expected data.
If the import fails with a "Connection Refused" error
This usually indicates that the command was entered incorrectly or the credentials provided are not valid for the specific database.
Verify that the database name is correct.
Ensure the username is the specific database user (e.g.,
user_db_name), not your account's primary login.Re-run the command, ensuring there are no spaces between the
>symbol and the filename.
Limitations
This method bypasses the upload_max_filesize and post_max_size limits of the web server, but the database must still be compatible with the MySQL or MariaDB version running on your account. This procedure does not provide a way to import a database if the file itself is corrupted.
