Previously, on every database created, I use:
mysql -u root -p
CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL ON dbname.* TO 'dbuser'@'localhost';
and then use the database without thinking about MyISAM or InnoDB
How to know storage engine used of a database?
You can check per-table like this:
you'll get an output along these lines:
This query lists all InnoDB tables and their databases in MySQL:
You can also list all tables and their storage engines:
Use the 'show engine' command to view the active default engine
Add default-storage-engine=InnoDB in [mysqld] section of the my.cnf file for the default engine to be active.
Use the 'show create table table_name' command to view default engine in the table.
To get engine name for a specific table
To change engine