0% found this document useful (0 votes)
4 views1 page

Mysql

The document provides an overview of MySQL tablespaces, which are logical structures used to store tables and indexes. It details different types of tablespaces, including system tablespace, file-per-table tablespace, and temporary tablespaces, along with their characteristics and advantages. Additionally, it includes commands for checking MySQL status, connecting to the database, and querying tablespace information.

Uploaded by

Kirhn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Mysql

The document provides an overview of MySQL tablespaces, which are logical structures used to store tables and indexes. It details different types of tablespaces, including system tablespace, file-per-table tablespace, and temporary tablespaces, along with their characteristics and advantages. Additionally, it includes commands for checking MySQL status, connecting to the database, and querying tablespace information.

Uploaded by

Kirhn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

==============MySQL DB Server========

Tablespace:
is a logical structure in mysql
tablespace is used for storing objects such as tables , indexes
tablespace specifies the location of the datafiles.
the default pages is 16KB.
==Different tablespces==
system tablespce
file-per-table tablespce
general tablespace
undo tablespace
temporary tablespace:-
global temporary tablespce
session temporary tablespace

====================
Tablespace: system tablespace
is called as innodb_system
is the storage area for the change buffer.
can also store tables and indexes.
is made up of one or more datafiles.
is of one datafile by deault.
the name of the default datafile is ibdata1
============
systemctl status mysql.service --to check status
mysql -h localhost -u root -p --to connect database
show variables like '%datadir%'; --to check the datadirectrory
rpm -qa | grep mysql --to check mysql packages
cat /etc/group | grep mysql
cat /etc/passwd | grep mysql

select file_id,file_name,file_type,tablespace_name
from information_schema.files where tablespace_name like 'innodb_system';

==============Filw-Per-Table Tablespace=========
is enabled by default
A file is created for every table created in the tablespace the file will be
created in the database directory path

created a directory with the name of the database, when a database is created.

for example or dsdb database


directory dsdb
path set by datadir variable
default path: /var/lib/mysql

ADVantages:
space is used ad tables are created.
space is released whenever a table is truncated and dropped.
truncating table are different
monitoring the table size in system level
filesize limit is applicabe 64 tb to each file.

You might also like