MySQL Administration – day 4

create database db1;

use db1;

create table Test1(id int);


CREATE TABLESPACE myspace add datafile 'myspace.ibd';

create table Test2(id int) TABLESPACE=myspace;


mkdir /datafile

chown mysql /data

CREATE TABLESPACE mysecspace add datafile '/data/mysecspace.ibd';

CREATE TABLE Test3(id int) TABLESPACE=mysecspace;


CREATE TABLE Test4(id int) DATA DIRECTORY='/data';

show create table Test1\G;

show create table Test2\G;

show create table Test3\G;

show create table Test4\G;

Author: Sauras Pandey

Sauras Pandey is an MCP, SQL Server DBA/Architect with 9+ years of experience working in a variety of environments

Leave a Reply

Your email address will not be published.