how to specify the engine type during creation of a database?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gomzi
    Contributor
    • Mar 2007
    • 304

    how to specify the engine type during creation of a database?

    I would like to know whether its possible to specify the default engine type during the creation of a database.

    Tried this...
    create database main character set = utf8 collate=utf8_ge neral_ci engine=innodb;
    but didn't work.
  • masdi2t
    New Member
    • Jul 2006
    • 37

    #2
    Originally posted by gomzi
    I would like to know whether its possible to specify the default engine type during the creation of a database.

    Tried this...
    create database main character set = utf8 collate=utf8_ge neral_ci engine=innodb;
    but didn't work.

    see ur system variables
    SHOW VARIABLES LIKE '%default%'

    find default_storage system variable and than change it to engine type u like using SET command or just write it on ur my.cnf/my.ini file.

    rgds.

    Comment

    • ScarletPimpernal
      New Member
      • Mar 2007
      • 39

      #3
      Hi,

      We can only change the character set and collations at the time of database creation.

      If u want to change the default storage engine for the tables in the database.
      Then after creating the database, use the below query

      SET table_type = '<The Storage Engine Name which has to be set as default';


      Thanks,
      Scarlet


      Originally posted by gomzi
      I would like to know whether its possible to specify the default engine type during the creation of a database.

      Tried this...
      create database main character set = utf8 collate=utf8_ge neral_ci engine=innodb;
      but didn't work.

      Comment

      • masdi2t
        New Member
        • Jul 2006
        • 37

        #4
        Originally posted by masdi2t
        see ur system variables
        SHOW VARIABLES LIKE '%default%'

        find default_storage system variable and than change it to engine type u like using SET command or just write it on ur my.cnf/my.ini file.

        rgds.
        i'm sorry, not default_storage , but storage_engine
        :D

        Comment

        Working...