Mysql changing default engine -
how change mysql engine myisam. having mysql innodb want change engine myisam. have do?
create table `classifieds_category` ( `id` int(11) not null auto_increment, `site_id` int(11) not null, `template_prefix` varchar(200) not null, `name` varchar(200) not null, `slug` varchar(50) not null, `enable_contact_form_upload` tinyint(1) not null default '0', `contact_form_upload_max_size` int(11) not null default '1048576', `contact_form_upload_file_extensions` varchar(200) not null default 'txt,doc,odf,pdf', `images_max_count` int(11) not null default '0', `images_max_width` int(11) not null default '1024', `images_max_height` int(11) not null default '1024', `images_max_size` int(11) not null default '1048576', `description` longtext not null, `sortby_fields` varchar(200) not null, `sort_order` int(10) unsigned not null default '0', primary key (`id`), key `classifieds_category_6223029` (`site_id`), key `classifieds_category_56ae2a2a` (`slug`), constraint `site_id_refs_id_2d06e6c6` foreign key (`site_id`) references `django_site` (`id`) ) engine=innodb default charset=utf8
i tried change engine here. don't want change every table. settings there change engine commonly??
i run query set default_storage_engine=myisam;
no reaction.
changing value of variable default_storage_engine
has no effect on existing tables. does, create new tables engine specified in variable when don't specify in create table
statement. it's default value.
also keep in mind, have distinguish between global
, session
variable values. have myisam default whenever create new table, , not current session, this:
set global default_storage_engine=myisam;
if want keep variable value after restarting server, have put follwing line default file my.cnf
under section [mysqld]
default_storage_engine = myisam
to convert current tables myisam every table:
alter table table_name engine=myisam;
but keep in mind, foreign key constraint not work anymore, myisam doesn't support it. not complain, ignore it. better sure, know you're doing :)
Comments
Post a Comment