Unable to import database
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
I installed XAMPP. The default Drupal installation works fine. I'm now trying to import a backup database from my old ADD configuration, but keep getting "You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit." from phpMyAdmin. Database file size is 17MB. I had no trouble uploading to ADD.
MySQL at ADD is 5.5.44-37.3 on XAMPP it is 5.0.11-dev - 20120503 according to phpMyAdmin. Could there be a problem with these different versions?
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
Thanks
Daniel
PHP XAMPP Guide wrote: Step 2 : Import the data
It’s the best solution to open new, clean database, and import the file in phpMyAdmin. Choose file from local folder and leave all settings as is. That should be it.
But if your file exceeded file size of 2MB (that is default value in xampp installation) than you need to tweak some out. Basically we will just increase the maximum upload file size.
Open your xampp install folder and go to php folder. With some text editor file (notepad++) open the file called php.ini (by type windows describe it as configuration settings) and edit the line (cca. 770, or press ctrl+f in notepad++ to find it):
post_max_size = 2M
instead 2M, put wanted maximum file size (16MB for example but not higher than 128M), after that go to this line:
max_execution_time = 30
instead 30, increase execution time that’s in seconds (90 for example), also you need to change this line:
max_input_time = 60
instead 60, increase input time in seconds (120 for example)
and top of all you have to change this line:
upload_max_filesize = 2M
instead of 2M, increase to 16M for example.
Save the file, restart apache and mysql in xampp and try to upload again, if you follow correctly you should be able to import files through 16MB (example)
You must pay attention to following:
If the upload_max_filesize is larger than post_max_size, you must increase post_max_size so that it is bigger than upload_max_size.
If the value of post_max_size is larger than memory_limit, you must increase memory_limit so that it is larger than post_max_size.
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Error
Static analysis:
1 errors were found during analysis.
Unrecognized keyword. (near "ON" at position 25)
SQL query: Edit Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: Documentation
#2006 - MySQL server has gone away
Open new phpMyAdmin window
Warning in .\libraries\dbi\DBIMysqli.class.php#261
mysqli_query(): MySQL server has gone away
...
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
SamStamport wrote: mysqli_query(): MySQL server has gone away
...
Server timed out and closed the connection. To fix, check that “wait_timeout” mysql variable and then restart your machine completely.
Thanks
Daniel
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
Thanks
Daniel
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
OK. I increased innodb_lock_wait_timeout = 50 to 10000. The import page now says Max: 128MiB). My actual file size is 17.4 MB.
The backup was created using ADD so all the cache tables were dumped. I think it's stuck on trying to restore these tables. Is there any way I can edit them out of the backup file?
Thanks,
Sam
Please Log in to join the conversation.
- Valentin
- Offline
- Posts: 9893
- Thank you received: 385
Let's try to not change sensitive files and use instead the default phpMyAdmin that comes with XAMPP; but first, restart your computer and double check localhost works for you by going to your browser to http://localhost/. phpmyadmin should be available from there to easily manage database imports.
XAMPP is designed to work after a successful installation without tweaks.
That being said, dealing with internal settings that may comes from your operative system is way beyond our support scope. For this matter I would recommend to check with Windows support or a technician.
Good luck!
Kind regards,
Valentín
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Why would you conclude that this database import problem was a Windows problem? Import via phpMyAdmin worked just fine when I was using ADD. If I were to post this problem at one of the various Windows support forums they would say that it is not a Windows problem and that they could not help me.
Please Log in to join the conversation.
- Valentin
- Offline
- Posts: 9893
- Thank you received: 385
Probably editing manually some sensitive files affected the performance of XAMPP.
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
I agree that editing sensitive files is not a good idea but that is what Daniel suggested.
It's too bad XAMPP did not work straight out of the box.
Now what do I do?
Please Log in to join the conversation.
- Valentin
- Offline
- Posts: 9893
- Thank you received: 385
My apologies for not being helpful on this one.
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
SamStamport wrote: I agree that editing sensitive files is not a good idea but that is what Daniel suggested.
If your database is too big that is the only way to add it. You could install a fresh drupal setup and import the database in parts. The advice I gave you was directly from the XAMPP FAQs
I am afraid we do not offer direct system support. Do you have an online host ? We could help you if it was on a hosting platform you could give us user credentials to access the site and assist with it's configuration.
Thanks
Daniel
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Could you recommend a free dev hosting platform where I can give you access?
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
You can use phpMyAdmin to backup individual or groups of tables to then import into your new database.
I would give that a try.
Thanks
Daniel
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
Inside the XAMPP folder do you have a php.ini file?
Thanks
Daniel
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
Thanks
Daniel
This message has an attachment image.
Please log in or register to see it.
Please Log in to join the conversation.
- SamStamport
- Topic Author
- Offline
- Posts: 71
- Thank you received: 0
I found php.ini in xampp/apps/drupal/htdocs (this is the one I've modified per your recommendations).
There is another one in xampp/php
Please Log in to join the conversation.
- Daniel Pickering
- Offline
- Posts: 438
- Thank you received: 58
SamStamport wrote: There is another one in xampp/php
That is the one we need editing :)
Thanks
Daniel
Please Log in to join the conversation.