Avatar billede henrikhartig Nybegynder
16. december 2010 - 10:34 Der er 7 kommentarer og
1 løsning

Ændre standard databaseengine

Hej
Er der nogen som ved hvordan man ændrer standard databaseengine fra myisam til innodb i mysql?

(således at man ikke skal skrive ENGINE=INNODB; ved hver enkelt Create Table)

/henrik
Avatar billede arne_v Ekspert
16. december 2010 - 18:47 #1
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html siger:

When you create a new table, you can specify which storage engine to use by adding an ENGINE table option to the CREATE TABLE statement:

CREATE TABLE t (i INT) ENGINE = INNODB;

If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file.

You can set the default storage engine to be used during the current session by setting the storage_engine variable:

SET storage_engine=MYISAM;

When MySQL is installed on Windows using the MySQL Configuration Wizard, the InnoDB or MyISAM storage engine can be selected as the default. See Section 2.3.4.5, "MySQL Server Instance Config Wizard: The Database Usage Dialog".
Avatar billede arne_v Ekspert
16. december 2010 - 18:47 #2
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html siger:

When you create a new table, you can specify which storage engine to use by adding an ENGINE table option to the CREATE TABLE statement:

CREATE TABLE t (i INT) ENGINE = INNODB;

If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file.

You can set the default storage engine to be used during the current session by setting the storage_engine variable:

SET storage_engine=MYISAM;

When MySQL is installed on Windows using the MySQL Configuration Wizard, the InnoDB or MyISAM storage engine can be selected as the default. See Section 2.3.4.5, "MySQL Server Instance Config Wizard: The Database Usage Dialog".
Avatar billede arne_v Ekspert
16. december 2010 - 18:47 #3
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html siger:

When you create a new table, you can specify which storage engine to use by adding an ENGINE table option to the CREATE TABLE statement:

CREATE TABLE t (i INT) ENGINE = INNODB;

If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file.

You can set the default storage engine to be used during the current session by setting the storage_engine variable:

SET storage_engine=MYISAM;

When MySQL is installed on Windows using the MySQL Configuration Wizard, the InnoDB or MyISAM storage engine can be selected as the default. See Section 2.3.4.5, "MySQL Server Instance Config Wizard: The Database Usage Dialog".
Avatar billede arne_v Ekspert
16. december 2010 - 18:47 #4
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html siger:

When you create a new table, you can specify which storage engine to use by adding an ENGINE table option to the CREATE TABLE statement:

CREATE TABLE t (i INT) ENGINE = INNODB;

If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file.

You can set the default storage engine to be used during the current session by setting the storage_engine variable:

SET storage_engine=MYISAM;

When MySQL is installed on Windows using the MySQL Configuration Wizard, the InnoDB or MyISAM storage engine can be selected as the default. See Section 2.3.4.5, "MySQL Server Instance Config Wizard: The Database Usage Dialog".
Avatar billede arne_v Ekspert
16. december 2010 - 18:47 #5
http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html siger:

When you create a new table, you can specify which storage engine to use by adding an ENGINE table option to the CREATE TABLE statement:

CREATE TABLE t (i INT) ENGINE = INNODB;

If you omit the ENGINE option, the default storage engine is used. Normally, this is MyISAM, but you can change it by using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file.

You can set the default storage engine to be used during the current session by setting the storage_engine variable:

SET storage_engine=MYISAM;

When MySQL is installed on Windows using the MySQL Configuration Wizard, the InnoDB or MyISAM storage engine can be selected as the default. See Section 2.3.4.5, "MySQL Server Instance Config Wizard: The Database Usage Dialog".
Avatar billede arne_v Ekspert
16. december 2010 - 18:48 #6
Ups. Undskyld duplikat.
Avatar billede henrikhartig Nybegynder
30. januar 2011 - 09:17 #7
Sorry. Har helt glemt at svare dig.
Tak for svaret. Har været inde og ændre standardengine :-)

Læg et svar.
Avatar billede arne_v Ekspert
30. januar 2011 - 18:33 #8
svar
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Computerworld tilbyder specialiserede kurser i database-management

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester