==============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.