Import existing database


I want to import my drupal database of my website which was till now on localserver. I created a new database and then I tried to run a query with the exported sql code(without the create database part) but when I do that I get the message “The connection to the server was reset while the page was loading.”. I tried this several times.
Could you help me on setting this up?


Where’s your problem, 000webhost or localhost?
phpMyAdmin application has a function (button) that allows you to export the tables. Perhaps the problem is that you are using a command does not correct for export or correct the file is very large.

Have you tried to export more than one file with only a few tables?


If the import fails it might be because the queries in the sql dump take too long and exceed the maximum execution time. Only way around that is to either use a tool like MySQL Dumper or BigDump, or break down the long queries. I guess the sql dump you have was generated with EXTENDED and COMPLETE inserts on?


The database (drupal)was exported from phpmyadmin of my localhost and imported on 000webhost. Most likely what happens is that it times out. The thing is that the txt file is really big (30588 lines of code/11.3MB) and as you can understand is a bit difficult to enter manually the queries…
I was looking for a more immediate and practical solution.
@Bad Karma, I will have a look on those two tools.
In the meantime any other suggestion is more than welcomed.



did you try 1-click database restore.


I just tried it and I got this message.
No database was selected (create any database first)

  • File extension must be .sql.gz;
  • File size must be less than 50MB;
  • Your domain is not yet pointing to our server;

I had ceated a database but the name is not the same as the one I have on localhost. I guess this is why I get this message.

I tried as well the same with phpmyadmin. As in to import compressed file and…wait for it…wait for it…it workedddddddd!!!Legandary!!!hahaha
I had some timeouts but by importing the same file it continued from the place it stoped(partial import).
I will now check what else is to be done in order to get my site done.
One last tip. On the ftp on which folder should I put my drupal folder(or just what it contains this folder)?top level or public html?

Thank you guys for your time and knowledge.


I have already setup the site’s folder, made the changes to default.php and now I get his error.
The mysqli error was: Access denied for user ‘a******_*****’@‘localhost’ (using password: YES)
Any ideas??


our mysql servers are not “localhost”. To find out which mysql server your database is hosted on please login to your control panel, click “MySQL” which will show you the name of the mysql server to use. Then configure your script accordingly.


Ok, I fixed this and it worked fine.
Then I saw my site properly but I had a problem with the links. When I was clicking on any link I was getting the error page.
This is about adding/editing on line on htaccess.
Please find instructions here.
After that everything looks fine(

Thanks again for your time and I hope this will be usefull for other users as well.