title: Database lose Foreign key, Auto Inc, Indexes on import on cpanel phpmyadmin
body: <p>i just completed a system and in the process of moving from localhost to an online host i noticed that all indexes,  auto increment columns,  foreign and primary keys , literally every relation disappear..     The user of the db has all priviledges. </p>
  
  <p>I thought maybe it was an error while exporting from localhost phpmyadmin,  but then,  i. created a test db on my pc running xampp,, and i imported the same db (the one misbehaving on online phpmyadmin) to the test db..</p>
  
  <p>Voila.. Its normal in the test db.. All relationship and indexes are intact.. So am really Confused  as i really need the relationship to work.. I cascaded deletes for FK and a whole lot of stuff depends on the relationships
  Thanks in advance</p>
  
  <p><br> <b>Edited:  </b> 
  See part of the sql file    for one table,   and i have about 40 tables     ..                                                                                                        </p>
  
  <h2>     -- Table structure for table <code>chat</code></h2>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `chat` (
  </code></pre>
  
  <p><code>id</code> int(11) NOT NULL,
    <code>user_id_one</code> int(11) NOT NULL,
    <code>user_id_two</code> int(11) NOT NULL,
    <code>date</code> varchar(25) NOT NULL
      ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;</p>
  
  <pre><code>--
  -- Dumping data for table `chat`
  --
  
  INSERT INTO `chat` (`id`, `user_id_one`, `user_id_two`, `date`) VALUES
  (2, 3, 2, '25-06-18 11:57:12');
  </code></pre>
  
  <hr>
  
  <h2>--     Indexes for table <code>chat</code></h2>
  
  <pre><code>   ALTER TABLE `chat`
     ADD PRIMARY KEY (`id`), ADD KEY `user_id_one` (`user_id_one`), ADD KEY 
    `user_id_two` (`user_id_two`);
  </code></pre>
  
  <h2>    -- AUTO_INCREMENT for table <code>chat</code></h2>
  
  <pre><code>ALTER TABLE `chat`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
  </code></pre>
  
  <h2>    -- Constraints for table <code>chat</code></h2>
  
  <pre><code> ALTER TABLE `chat`
  ADD CONSTRAINT `ch_uid` FOREIGN KEY (`user_id_one`) REFERENCES `account` 
  (`user_id`) ON DELETE NO ACTION ON UPDATE CASCADE,
  ADD CONSTRAINT `ch_uid2` FOREIGN KEY (`user_id_two`) REFERENCES `account` 
  (`user_id`) ON DELETE NO ACTION ON UPDATE CASCADE;
  </code></pre>