bosss Posted June 24, 2021 Share Posted June 24, 2021 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 Giray 1 Link to comment Share on other sites More sharing options...
Giray Posted July 5, 2021 Share Posted July 5, 2021 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 More sharing options...
Nathan Explosion Posted July 5, 2021 Share Posted July 5, 2021 On 6/24/2021 at 9:49 PM, bosss said: Can i use this query to convert whole database at once..... No, as that query isn't going to do any conversion. Run the query, it gives you a series of 'ALTER...' statements that you then run against the database yourself. bosss 1 Link to comment Share on other sites More sharing options...
Recommended Posts