Jump to content

Database Conversion


Recommended Posts

I am on 4.6.2 and got notice in admin cp that i should use InnoDB instead MYISAM -

Can i use this query to convert whole database at once or my convert table by table?

SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;

Maybe you have beter suggestion? Can i leave MyISAM mean stay on it?

 

regards

Link to comment
Share on other sites

  • 2 weeks later...
On 6/24/2021 at 4:49 PM, bosss said:

I am on 4.6.2 and got notice in admin cp that i should use InnoDB instead MYISAM -

Can i use this query to convert whole database at once or my convert table by table?

SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;

Maybe you have beter suggestion? Can i leave MyISAM mean stay on it?

 

regards

Also interested in knowing.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...