Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create innodb database in mysql


I tried to create a database type of innodb.I tried this query but its not exectuted.

CREATE DATABASE "mydd" ENGINE = InnoDB

I checked the configuration and it says innodb enabled. I also searched in web but only ended up
with creatin innodb tables.

I set the database as innodb then all the table under this will takes the same type and no need to specify again.Also my defauld engine should not be innodb.

Can anyone help me out? Thanks.

like image 990
vkGunasekaran Avatar asked Jan 21 '11 06:01

vkGunasekaran


People also ask

How do I make an InnoDB table?

To create an InnoDB table, specify an ENGINE = InnoDB option in the CREATE TABLE statement: CREATE TABLE customers (a INT, b CHAR (20), INDEX (a)) ENGINE=InnoDB; The statement creates a table and an index on column a in the InnoDB tablespace that consists of the data files that you specified in my. cnf .

Is InnoDB a database?

InnoDB is a storage engine for the database management system MySQL and MariaDB. Since the release of MySQL 5.5. 5 in 2010, it replaced MyISAM as MySQL's default table type. It provides the standard ACID-compliant transaction features, along with foreign key support (Declarative Referential Integrity).

Does MySQL support InnoDB?

InnoDB is a general-purpose storage engine that balances high reliability and high performance. In MySQL 5.6, InnoDB is the default MySQL storage engine. Unless you have configured a different default storage engine, issuing a CREATE TABLE statement without an ENGINE clause creates an InnoDB table.

How do I create a new database in MySQL?

Open the MySQL Workbench as an administrator (Right-click, Run as Admin). Click on File>Create Schema to create the database schema. Enter a name for the schema and click Apply. In the Apply SQL Script to Database window, click Apply to run the SQL command that creates the schema.


1 Answers

I don't think you can specify Engine while creating database.

because one database can have multiple engine type tables in it

Check create database command at http://dev.mysql.com/doc/refman/5.5/en/create-database.html

like image 155
shankhan Avatar answered Oct 24 '22 08:10

shankhan