What to do if you cannot import a database using phpmyadmin on Jumpline / VDS server? This problem has come up a few times:
I am trying to restore my database from an original one that was backed up. I’m in PHPMyAdmin and the max file size for database uploading is 2MB.. Well I need at least 8MB in order to complete the restore. I have already zipped the file and it is 4MB (original 17MB)
Can someone help?
I had this problem.
The proper solution is to use the command line, and not phhmyadmin. But, you can modify the config files to allow this.
Need to locate a file called /etc/php.d/99user.ini (or maybe create the file) and input this (or something similar, i.e. 8M if you will never require more):
upload_max_filesize = 26M
memory_limit = 26M
post_max_size = 26M
This is normally done in the php.ini file, but on our servers we cannot modify this. Here is what it ways in the php.ini:
# The settings in this file are optimized for the VDS hosting environment.
# This file is read-only. If you need to alter these values, or add new
# settings, please create or edit the file /etc/php.d/99user.ini instead.
# Any option set that file will override these.
# For documentation on these settings, please see
# You must restart the VDS using the VDS Manager for any configuration
# changes to take effect.
However, you can use the command line to fix/manage the database, and there are no limitations. I struggled, even with allowing larger files, and a friend simply asked “why are you using php to import to mysql?”.
This works on Ubuntu servers, i assume also on Jumpline….
|[email protected]:/var/www/domain# mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.0.38-Ubuntu_0ubuntu1.1-log Ubuntu 7.04 distributionmysql> drop database yourdatabase(that has been backed up)
mysql> create database yourdatabase
[email protected]:/var/www/domain# mysql -u root -p yourdatabase <>
This does the following:
Open up MySQL
Delete old database (not always required, try first without doing this)
Create a new blank database
Import old database.sql (i.e. your backup) into the newly created database
Fingers crossed, this will work. If it does not, don’t blame me, as I am a nooob too, and all of this is from a transcript a friend sent me after fixing my database problems.