DEV Community

technonotes-hacker
technonotes-hacker

Posted on

எளிய தமிழில் MySQL - [ 1 to 30 Pages ]

  • Database --> Its a software to store data in a structured way.

  • SQL --> Structure Query Language - Its a language used to store data in database.

  • RDBMS --> Its management software used to connect the data database.

Now coming to MYSQL : Its a RDBMS software , Free software under GPL.

  • It as server and client.
  • MYSQL Client --> Front end Tool / Console Prompt in windows / Shell prompt, we type the command here.
  • MYSQL Server --> Will take the command from client and execute in server , which we can't see.It just gives the result.

Image description

Things MYSQL client does ,

  1. Authentication for password check.
  2. SQL queries will be changed to tokens , that tokens will be given to MYSQL server.
  3. To monitor the Encrypt and compress network.
  4. Then it gets the response from server and displays to the front end tool.

Things MYSQL Server does ,

  1. Gets the request from client and then sends the response . _Management Layer & Storage Engine _ are responsible for this. ( Memory , Disk & Network are interconnected to these layer mentioned above )

Management Layer

Gets the request from client and கீழ இருக்கிற எல்லா வேலையும் பண்ணும் ,

  1. connection decrypt or encode.
  2. Queries check and parse them.
  3. Get the Catched queries from Query cache
  4. Then it sends to Storage Engine.
  5. Disk and memory logs are its responsibility.

Storage Engine Layer

  1. Database, tables , indexes are taken care here or managing.
  2. Above related logs are taken care.
  3. It also sends data to other MYSQL servers via network is also done.

INSTALLATION

sudo apt-get install mysql-server mysql-client
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

sudo mysql_secure_installation
Enter fullscreen mode Exit fullscreen mode

Gave y & 0

Image description

Image description

Image description

In short , remove the anonymous user , only root can be executed only in localhost & remove the test database.

CONFIGURATION

cat /etc/mysql/my.cnf --> எல்லா configurationனும் இங்க தான் இருக்கும். OR /etc/mysql/mysql.conf.d/mysqld.cnf

Image description

Image description

create a backup file of the configuration like below,

sudo cp my.cnf my.cnf_bk_june172024 [ TBD , change in the config location ? ]
Enter fullscreen mode Exit fullscreen mode

Image description

port = 3306
user = mysql
data dir = /var/lib/mysql
bind-address = 127.0.0.1
log_error = /var/log/mysql/error.log

[ Parameters to be seen ]

Enter fullscreen mode Exit fullscreen mode

Image description

Query Cache [ TBD , where to put these values ? ]

All the queries which are executed in MYSQL Server , results are stored in cache.

query_cache_limit = 1m
query_cache_size = 16m

m --> MB
This m can be raised or decreased depends on the RAM.

Server Stop & Start

sudo service mysql restart
sudo service mysql stop
sudo service mysql start

MYSQL Client Installation

There are many in market,

sudo apt-get install MySQL-workbench --> second mostly used
sudo apt-get install MySQL-navigator
sudo apt-get install emma
sudo apt-get install MySQL-admin
sudo apt install phpmyadmin -y --> Best in market --> 1st

Notes :

  1. GPL --> General Public License.
  2. RDBMS --> Relational Database Management System
  3. Control + l --> Top of the screen in Linux
  4. Note , if any changes in my.cnf MYSQL server needs to be restarted.
  5. Configuration file is in /etc/mysql/mysql.conf.d/mysqld.cnf
  6. sudo find / -name "*.cnf"
  7. https://www.tecmint.com/mysql-gui-tools-for-linux/

Reference

https://freetamilebooks.com/download/%e0%ae%8e%e0%ae%b3%e0%ae%bf%e0%ae%af-%e0%ae%a4%e0%ae%ae%e0%ae%bf%e0%ae%b4%e0%ae%bf%e0%ae%b2%e0%af%8d-mysql-a4-pdf/?tmstv=1712985924

https://kaniyam.com/ebooks/

Image description

Top comments (0)