unknown variable 'default-storage-engine=myisam'

Dr.Seuss picture Dr.Seuss · Aug 30, 2012 · Viewed 14.9k times · Source

I am trying to configure Mysql (Ver 14.15 Distrib 6.0.8-alpha, for Win64) to use MyISAM as the default storage engine on Windows 7. I've created C:\my.cnf with the following contents:

[mysql]
default-storage-engine=myisam

And after restarting the mysql service and attempting to run mysql from the console, I get the following error message:

mysql: unknown variable 'default-storage-engine=myisam'

I've been working from tutorials and have copied and pasted the above directly into my my.cnf file.

I've tried a combination of the following:

set default-storage-engine=myisam
storage-engine=mysiam
set storage-engine=mysiam

Answer

jsist picture jsist · Aug 30, 2012

I tried changing it and it worked for me.

What I did was simply changed the value from "INNODB" to "MYISAM" in [mysqld] group as follows

from

default-storage-engine=INNODB

to

default-storage-engine=MYISAM 

Note: its [mysqld] group not [mysql] group. [mysql] group is for MySQL client, not for server.

Alternatively, you can change default storage engine by executing

"set global storage_engine=MYISAM"

You will not be required to restart the server in this case.

Hope it helps....