MySQL

From Anthony Pastor Wiki Notes - Verba volant, scripta manent
Revision as of 11:11, 16 April 2015 by Anthoanthop (talk | contribs)
Jump to navigation Jump to search
  • List MySQL tables engines for a MYDB database:
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'MYDB' AND ENGINE IS NOT NULL ORDER BY ENGINE;
  • Change engine for a MYTABLE table:
ALTER TABLE MYTABLE ENGINE=InnoDB;
ALTER TABLE MYTABLE ENGINE=MyISAM;
  • Unlock replication (ex: Duplicate Key):
SET GLOBAL sql_slave_skip_counter = 1; start slave;