MySQL Installation
2- Types of installation packages
1- MySQL Installation using generic binaries
In this we can select the version (older version of MySQL)
2- MySQL Installation using YUM on RHEL
Which is available with Repositories, supported latest version (APT=GET)
Through Putty we connect by providing IP and KEY
Install MySQL using generc Binaries(LINUX)
👉 Download the package
Download MySQL binaries-> 1st one Generic binaries
Download MySQL community server
LINK: http://dev.mysql.com/downloads/mysql/
mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz
👉Go to Putty IN ROOT
wget http://dev.mysql.com/downloads/mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz ./
ls –la
Follow the steps which generic install through binaries
👉Depending packages
👉Adding USER
👉Extracting the tar fle –xvf
Once this extracted will create symbolc lnk to mysql user name
Why we have done in /usr/local such that It should use locaton in = /usr/local
👉We can create symbolic link to folder to mysql user name or rename folder to mysql
Inside the SCRIPT folder, we have mysql_install_db
This is the script which Initialize MySQL and creates our MysqL DB
👉When we are Initializing we have user = MYSQL
👉If you find any errors we need to fix error, If you got OK then no need to worry
NOTE: HERE MySQL user doesn’t have the root Privilege’s
Starting MySQL Server
In Bin folder we have script with mysqld_safe will actually Initialize the Server and this mysqld_safe process is kind of a Wrapper with user= mysql running in background
👉 MySQL server has been processed or Initiated and copy the below command
👉In the support files, we have script with mysql.server which we are copying to init.d folder
So we can START & STOP from der itself
👉 This below command won’t require next time
👉 Purpose of this step is when the server goes to reboot the MySQL server start automatically
Login to MySQL Database
./mysql – Is a client program
👉 Current Db
👉 3-DB’s
Show tables;
👉SET THE password through the script
Through below command we can connect DB
👉NOTE:./mysql –u root –p – To connect DB
👉Exit
When you tries to start and stop or rebooted MySQL by default it will reads from /etc folder
Coped my.cnf (brain of mysql)
👉Run the mysql_Secure_Installation Script
👉This mysql_Secure_Installation removes anonymous users sets password for us and removes anonymous db’s
PRESS ENTER
👉Anonymous user = A user doesn’t have any password or any host
👉LOGIN MySQL with user details
👉After removing test DB
👉TWO STEPS to allow create users from REMOTE
👉First, we need to change in my.cnf file
It means we can connect through Remote allowed
Create user for allow remote
Regarding Flush Privileges
When you update anything from mysql.user, It doesn’t updated directly
When we restart the server, it will reflect or use Flush Privileges
👉Note: GRANT ALL Flushes everything by default, but when you update insert update or delete from user table when server will re-start or
Flush Privileges
Commit specific to similar tables
👉If you need auto commit just enable below parameter
Author : Teja |
LinkedIn : https://www.linkedin.com/in/teja-sai-nadh-reddy-tatireddy-048882201
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates.
KTExperts is always active on social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform
Note: Please test scripts in Non Prod before trying in Production.