User Tools

Site Tools


mysql_storageengine

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mysql_storageengine [2016/02/05 14:46] luke7858mysql_storageengine [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 3: Line 3:
 \\ \\
 mysql < 5.5 the default engine is MyISAM mysql < 5.5 the default engine is MyISAM
 +\\
 +\\
 Before we convert tables we can first view the table engine with: Before we convert tables we can first view the table engine with:
 +\\
 +**Note**: Change 'db_name' to your database
 <sxh bash> <sxh bash>
 +SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'db_engine';
 </sxh> </sxh>
 Now we have viewed the table engine we can go ahead and convert the tables. Now we have viewed the table engine we can go ahead and convert the tables.
 \\ \\
 \\ \\
-Example: Changing MyISAM tables to InnoDB:+Example: Changing MyISAM tables to InnoDB 
 +\\ 
 +\\ 
 +**Note**Change 'db_name' to the database you wish to change the engine of 
 <sxh bash> <sxh bash>
-SET @DATABASE_NAME = 'table_engine';+SET @DATABASE_NAME = 'db_name';
  
 SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
mysql_storageengine.1454683568.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki