0

I’m trying to upload a file that’s called pokemon.sql and it’s 49.7MB, so MySQL is telling me it’s too large. I’ve read the documentation and tried to implement some of the suggestions, but I’m very new to all of this and am unsure how to proceed.

I tried to put in source filename.sql; into Terminal but it says no such file or directory,and connecting to MySQL first according to instructions online also failed. I can’t find the configuration file either, to change max_execution_time, upload_max_filesize etc.

Edit: I almost have my answer in the comments, I just need to know what to change max_execution_time, upload_max_filesize, memory_limit and post_max_size to.

AJW009
  • 1
  • 4
  • and if you're trying to import using terminal, then you should open terminal in the directory your sql file is stored or else you need to pass the full path of the sql file if your opened terminal in the root folder. – OMi Shah May 18 '23 at 16:23
  • @OMiShah, I can’t find the php.ini file anywhere. I’ve been looking but all the information on where to find it hasn’t helped. – AJW009 May 18 '23 at 16:32
  • https://stackoverflow.com/questions/6185319/how-to-locate-the-php-ini-file-xampp – OMi Shah May 18 '23 at 16:33
  • I think I’ve found it, but I don’t have an application to open it. Any sugggestions? I have TextEdit? – AJW009 May 18 '23 at 16:36
  • yes you can use TextEdit but I would recommend you to open in VS Code or any code editor you're currently using on your system for better readability. – OMi Shah May 18 '23 at 16:37
  • I don’t have VS Code, and am not aware of any code editor on my system, so I’ll download VS Code. – AJW009 May 18 '23 at 16:40
  • @OMiShah, thank you, I am making some progress.At the moment, `max_execution_time` is 120, `upload_max_filesize` 40M, `memory_limit` is 512M and `post_max_size` is 40M. Given the file is 47.9MB, I figure I should change the two 40M figures to 50M. Is this right and should I change anything else? – AJW009 May 18 '23 at 16:56
  • Is this question still open? I was so close to getting an answer. – AJW009 May 18 '23 at 17:40
  • yes, you have to only change the value of ``upload_max_filesize`` and ``post_max_size``. – OMi Shah May 18 '23 at 18:12
  • @OMiShah, I’m sorry that I still need help, but I’ve changed those two values bit by bit until they’re both now 100M and I’m still being told it’s too large. Surely that’s supposed to refer to 100 million bytes, right? And yet that’s more than double the size of the file. What else am I getting wrong do you think? – AJW009 May 19 '23 at 10:55
  • after updating size you need to restart apache server – OMi Shah May 19 '23 at 11:28
  • Thank you @OMiShah, that has been really invaluable help. I still cannot import my database, but at least now it's not because the file size is too large. I'm a bit frustrated that I've hit another roadblock, but I really am grateful and appreciative of your help. – AJW009 May 19 '23 at 12:15
  • what error you're getting now? I might be helpful if you could tell me the issue. – OMi Shah May 19 '23 at 13:14
  • I was hoping to show you a picture I took of the issue to show my friend, but I can’t. Basically, it’s saying that no database is selected, possibly because it’s involving Django, which I don’t have? My friend has gone through the trouble of creating an `.sql` file from a GitHub database for me, but thinks he may have missed a Django table. – AJW009 May 19 '23 at 22:57

0 Answers0