0

I set index for mysql table, when i take backup using query browser , mysqlworkbench dose not display index details. What is the problem or else any mine mistake.

See mine table. I have set index for "id" column but not display that details.

CREATE TABLE IF NOT EXISTS `testsakthi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

My Question is where is index details? EX:

CREATE TABLE child (
    id INT, parent_id INT,
    INDEX par_ind (parent_id),
    FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE
) ENGINE=INNODB;

I have found some url they told some idea. see title " NO_KEY_OPTIONS "

http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html

Ozzy
  • 8,244
  • 7
  • 55
  • 95
mayasakthi
  • 25
  • 1
  • 7
  • Works for me. What steps are you taking? Please be specific. – Marcus Adams Apr 18 '12 at 13:25
  • See my table CREATE TABLE IF NOT EXISTS `testsakthi` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` int(11) NOT NULL, `status` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; – mayasakthi Apr 18 '12 at 13:45

1 Answers1

0

Use mysqldump from the command-line if possible, and the indexes will be dumped too:

mysqldump -R --user=username --password=password dnname > outputfile.sql
bfavaretto
  • 71,580
  • 16
  • 111
  • 150
  • This comment is not working. please let me how to get dumb in my local machine "WAMP SERVER" – mayasakthi Apr 18 '12 at 14:56
  • You have to locate the `mysqldump` executable inside your wamp folder, and run it from there, via DOS prompt. But your question is not very clear. The code you posted does include index information (`PRIMARY KEY`, `KEY`...). – bfavaretto Apr 18 '12 at 15:03