During development, the myisam database needs to be converted to the innodb database. This method is often used because innodb supports many types that are not supported by myisam, such as stored procedures, here we provide a method. If you need it, you can refer to it.
During development, the myisam database needs to be converted to the innodb database. This method is often used because innodb supports many types that are not supported by myisam, such as stored procedures, here we provide a method. If you need it, you can refer to it.
! Rm-f/tmp/ivan_alter. SQL # pre-delete temporary files. The following statements cannot be written.
The Code is as follows: |
|
SELECT concat ('alter table'', TABLE_SCHEMA, '. '', TABLE_NAME,'' engine = innodb ;') FROM information_schema.TABLES Where engine = 'myisam' AND TABLE_SCHEMA <> ''AND TABLE_SCHEMA <> 'information _ Scheme' Into outfile '/tmp/ivan_alter. SQL ';
Source/tmp/ivan_alter. SQL
! Rm-f/tmp/ivan_alter. SQL |
# Deleting a temporary file after execution