Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:20:42+00:00 2026-06-15T13:20:42+00:00

im having a mysql database which around 300mb but unfortunately i cant import this

  • 0

im having a mysql database which around 300mb but unfortunately i cant import this file to my web host using phpmyadmin and i dont have shell access.

i tried the below alternatives

MySQLDumper

bigdump

but could get it inserted to the database.

The database has been uploaded to a folder in .sql format. is it possible to create a php script to read the .sql file and execute the queries?

the sql file was dumped using mysqldump.

below is the format. (please not that i have removed some lines coz there are so many)

DROP TABLE IF EXISTS `prime_lands`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hotels` (
  `hotel_id` int(11) DEFAULT NULL,
  `chain_id` int(11) DEFAULT NULL,
  `chain_name` varchar(100) DEFAULT NULL,
  `brand_id` int(11) DEFAULT NULL,
  `brand_name` varchar(100) DEFAULT NULL,
  `hotel_name` varchar(100) DEFAULT NULL,
  `hotel_formerly_name` varchar(100) DEFAULT NULL,
  `hotel_translated_name` varchar(100) DEFAULT NULL
...........
)

-- Dumping data for table `prime_lands`
--

LOCK TABLES `prime_lands` WRITE;
/*!40000 ALTER TABLE `prime_lands` DISABLE KEYS */;

INSERT INTO `prime_lands` VALUES (1,421,'Samed Resorts Group',921,'Samed Resorts Group','Sai Kaew Beach Resort','','Sai Kaew Beach Resort',.......................)

....................................
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:20:43+00:00Added an answer on June 15, 2026 at 1:20 pm

    should work:

    $run=   exec ('mysql -u username -p password database_name < filename.sql ', $out);
    var_dump($run);
    var_dump($out);
    

    May be better for debugging:

    $out = shell_exec('mysql -u username -p password database_name < filename.sql');
    var_dump($out);
    

    as a one off you may be able to ask your host to run the command for you, most ‘nice’ hosts would help you out with this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to query a MySQL database using an array but I'm having trouble!
I'm trying to import a text file into a MySQL database, and I'm having
i am having trouble configuring mysql database to connect to the right file. I
Is it possible to check if a (MySQL) database exists after having made a
I am having trouble UPDATING my database using FMDB . Here's my SQL BOOL
I'm having this Mysql query, It works: SELECT nom ,prenom ,(SELECT GROUP_CONCAT(category_en) FROM (SELECT
I'm working with a mysql database, which involves gathering photos and peoples names and
I Have MySQL Database in which one of the column contains User Mobile Number.
This is relating to UTF-8, PHP and XML Mysql , which I am still
i am having a mysql database, and in one table i have f_id as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.