title: import a large mysql database using php
body: <p>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.</p>
  <p>i tried the below alternatives</p>
  <blockquote>
  <p>MySQLDumper</p>
  <p>bigdump</p>
  </blockquote>
  <p>but could get it inserted to the database.</p>
  <p>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?</p>
  <p>the sql file was dumped using mysqldump.</p>
  <p>below is the format. (please not that i have removed some lines coz there are so many)</p>
  <pre><code>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',.......................)
  
  ....................................
  </code></pre>