how to install let’s encrypt ssl certificate in centos using SSH command

Nowadays hacking is so simple,with out much technical extreme anybody can access other data,so it is important to encrypt the data when it exchange between the system,fortunately we have a standard security protocol called ssl to encrypt our data,among the ssl certificate let’s encrypt certificate is most popular and it is free.So we will discuss how to install let’s encrypt ssl certificate in centos using SSH command.We have certbot is their to do that. we will check each steps one by one

Login to ssh window

1) Download Certbot

#wget https://dl.eff.org/certbot-auto

2) Move Certbot to /usr/local/bin/

#sudo mv certbot-auto /usr/local/bin/certbot-auto

3) Change certbot-auto folder Owner to root

#sudo chown root /usr/local/bin/certbot-auto

4) Change certbot-auto folder permission to 755

#sudo chmod 0755 /usr/local/bin/certbot-auto

5) Install let’s encrypt ssl certificate in centos using SSH command

#sudo /usr/local/bin/certbot-auto --apache

How to enable Let’s Encrypt SSL certificate from cpanel

We know Let’s Encrypt SSL is most used SSL certificate and also it is a free service,you can install this free Let’s Encrypt SSL certificate for any of your domain.We know we can enable Let’s Encrypt SSL certificate from command prompt .Here am using cpanel for my server management, so in this tutorial we are going to discuss how to enable Let’s Encrypt SSL certificate from cpanel.

1) Open cPanel ,go to Security Section and check Lets Encrypt™ SSL tab is their or not

Let’s Encrypt SSL certificate from cpanel

2) If not their open SSH prompt

see link How to connect to ssh command prompt using cPanel info

3) add letsencrypt repo

#wget https://cpanel.fleetssl.com/static/letsencrypt.repo -O /etc/yum.repos.d/letsencrypt.repo

4) Install letsencrypt plugin

#yum -y install letsencrypt-cpanel

5) Test letsencrypt Installation

# le-cp self-test

6) Now again Open cPanel ,go to Security Section and check Lets Encrypt™ SSL tab

Let’s Encrypt SSL certificate from cpanel 2

7) Add your domain info and create Let’s Encrypt SSL certificate from cpanel

enjoy 🙂

How to change MySQL root password without knowing the old password ?

Sometime we don’t have any idea about the old MySQL root password,but we have to use root password to manage our application so automatically you are going to behind the topic how to change MySQL root password without knowing the old password,here am using Linux os and we have Linux root ssh login details.So lets find out the steps to change root password

1) Stop the server

 #service httpd stop

2) open MySQL section

 #mysql
  How to change MySQL root password without knowing the old password step 1

3) Select Mysql Database

  > use mysql

4) Update root Password Section

>update user SET password=password(“hello@123”) where user=’root’;

if you are getting error for changing MySQL root password follow steps 5

5) show tables

   > show tables



How to change MySQL root password without knowing the old password step 2

 user table exits

6) Find user table fields

   > describe user
  How to change MySQL root password without knowing the old password step 3
 No password field instead of password we have authentication_string fields

7) Finally update new password

update user SET authentication_string=password("hello@123") where user='root' 

Full Text Search In MySQL ,a better way for MySQL Text search

One of the most common issue with MySQL is searching for a matching string from a huge database,suppose we need to search for ‘MySQL Tutorial’ it will only search the occurrence of ‘MySQL Tutorial’ neither ‘MySQL’ or ‘Tutorial’ also in MySQL compared to INT value search Char/Text is time consuming to solve this issue, we have Full Text Search .Full Text Search is a technique used by search engine to find the results in a database.we can use Full Text search in search Query.First you must create a full-text index on the table before you run full-text queries on a table.

Creating a full-text index inside a Table


ALTER TABLE TABLE NAME ADD FULLTEXT (FIELD1, FIELD2,FIELD3, etc)

Example

ALTER TABLE wptt_posts ADD FULLTEXT (`post_title`, `post_content`)

Full Text Search In MySQL

Now we created Full Text Index in wptt_posts table,next we will discuss how to use Full Text Search in MySQL


MySQL Query Using Full Text Search

SELECT * FROM TABLE NAME WHERE MATCH (FILED1FILED2,FILED3) AGAINST ('SEARCH WORD' IN NATURAL LANGUAGE MODE)

Example

SELECT * FROM wptt_posts WHERE MATCH (post_title,post_content) AGAINST ('Mysql Tutorials' IN NATURAL LANGUAGE MODE)
Full Text Search In MySQL 2

We can use the match case based on the Score

SELECT MATCH (post_title,post_content) AGAINST ('Mysql Tutorials') as score, post_title FROM wptt_posts WHERE MATCH (post_title,post_content) AGAINST ('Mysql Tutorials' IN NATURAL LANGUAGE MODE)



Full Text Search In MySQL 3

Where the score value represent the occurrence of search term in the filed

We can skip words (exclude words) from the result

For e.g “-Tutorials” means the search result should not contain Tutorials

SELECT * FROM wptt_posts WHERE MATCH (post_title,post_content) AGAINST ('+Mysql -Tutorials' IN BOOLEAN MODE)