Importing large SQL file via phpMyAdmin
On September 08,2022 by Tom RoutleyIssue
I have a concern with PHPMyAdmin and my server,
to tell the story: I create a server (well I try) locally by importing a *. sql . Everything worked correctly, so to enjoy it with friends, I said why not host it on the Internet.
Then I buy a small cheap web hosting, and when to import my *. sql file, I see that the most you can import into phpMyAdmin is about 8mo gold do my 32MB file.
So I see two possible solution is to give that I know almost nothing in php : I either cry over my fate I'm asking for is assistance. So I ask for help.
I saw on some other forum and gave the command line and that was the miracle solution but what is good and orders or return?
That is the problem, if anyone has a solution, a tutorial (for novice in php, but rather experiment with computer )? thank you in advance, hoping I was clear and without too many mistakes.
Solution
Importing a large file from the command line is simple:
#mysql -p... -u... -h... database_name < file.sql
Eg with the user "root", password "test" database name "mydb":
#mysql -ptest -uroot my_db < file.sql
I'd be surprised that your host you allows access from the command line, especially if it's a shared hosting ...
In this case, you have no choice but to do so via the interfaces provided, either phpMyAdmin or another.
At last you can also cut your file. sql in 4: you just have to cut any line insert after ending.
Note
Thanks to dam75 for this tip.
Article Recommendations
Latest articles
Popular Articles
Archives
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- January 2021
Leave a Reply