Posts

MySQL Global Variables,Session Variables and default MySQL databases

Image
Here we will first go through the different types of variables, i.e. , Global and Session variables, and then look at the default databases of the mysql server. Global Variables Global variables are parameters that define how the server behaves. Each global variable has a default value which is initialised when the server starts. Global variable is identified by @@variable_name (@@ sign) To see the default values of these global variables you can either execute:     show global variables like 'variable_name';                     or     select @@varible_name; To get the names of all the global variables:     show global variables; You can also change the default value of any global variable according to your needs. For example:     set global max_connections = 300; More examples of global variables are: wait_timeout server_id max_connections etc. Session Variables Session variables are al...

MySQL architecture, locations of MySQL installed files and MySQL Shell commands

Image
In this post we will first take a look at the mysql architecture and then explore the locations of the installed mysql files. First layer is the client-layer: It is an interface between the mysql user and the database server. It handles client connections and requests. authentication and authorisation to ensure secure access. Second layer is the Daemon process: mysqld(daemon process) runs core server process that runs in the background to manage the database operations. It oversees query execution, caching, session management. Third layer is the MySQL brain: This is the core execution engine responsible for managing and processing data. It includes the storage engine layer, with innoDB being the most commonly used storage engine Fourth layer is the Physical storage layer: This layer deals with the actual data and database files on the underlying file system. Handles how MySQL stores and receives data physically on disk. This is the basic overview of the MySQL architecture. Now lets exp...