How do I set the default table type as innodb in my.cnf?
11,753
Solution 1
Edit your my.cnf file to set following in the [mysqld] section (or the section your MySQLd reads):
default-storage-engine=InnoDB
After restarting the MySQL server, InnoDB should be the new default. To verify this, run the SQL statement:
SHOW ENGINES;
...The InnoDB line should be indicated as DEFAULT.
Note that the default-storage-engine option is just an alternate name for default-table-type.
Solution 2
Yes, you can
default-storage-engine=InnoDB
default-table-type=InnoDB
Related videos on Youtube
Author by
Alex
Updated on September 17, 2022Comments
-
Alex over 1 year
For mysql...is there a way to set it so that every table that gets created is innodb?
-
ACP about 14 years@lockie i couldnt find my.cnf file img691.imageshack.us/img691/524/mysqln.jpg plz help me...
-
tacotuesday over 9 years
default-table-type
is a deprecated synonym fordefault-storage-engine
, and may cause MySQL to not start on 5.x. See here -
Andrew over 7 yearsThanks, for me, needed to set default-storage-engine=InnoDB in WAMP > mysql > my.ini