Tuesday, June 16, 2020

URL Redirection scenarios to be tested while installing SSL Certificates

If you are trying to install SSL certificates for the first time.

Do ensure to test all possible scenarios of URL direction

  • Ensure http URLs are redirecting properly
  • Ensure https URLs are not giving any invalid certificate errors
  • Ensure naked domains in http are redirecting properly
  • Ensure naked domains in https are redirecting properly

For Example, If you own the domain name as "yourdomain.com", then you must test all below scenarios by typing the below URLs in browser and testing all the page loads or redirection:

  • https://www.yourdomain.com
  • http://www.yourdomain.com
  • www.yourdomain.com

  • https://yourdomain.com
  • http://yourdomain.com
  • yourdomain.com

  • https://subdomain.yourdomain.com
  • http://subdomain.yourdomain.com
  • subdomain.yourdomain.com

Tuesday, April 28, 2020

How to install MySQL/MariaDb server in GCP Ubuntu Instance

f you are using Google Cloud Platform and trying to install MySQL server (MariaDB) on Ubuntu 16.04, you may frequently get some issues while trying to install.

You may get some error like the below one:

Errors were encountered while processing: mysql-server-5.7 mysql-serverE: Sub-process /usr/bin/dpkg returned an error code (1)

In this case, follow these steps to clean up the MySQL server installation.

Type the below command in the same order:

  • sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
  • sudo rm -r /etc/mysql/mysql.conf.d/
  • sudo mv /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak
  • sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7
  • sudo apt install mysql-server
  • sudo ln -s /etc/mysql/mysql.conf.d /etc/mysql/conf.d
  • sudo service mysql start

To check if MySQL is running properly or not, you can type below command to check status:

systemctl status mysql.service

or can use this command to know the version of MySQL

mysqladmin -p -u root version

Hope you found this post useful and it solved your problem!

I found this solution here: [Credits]

Thursday, March 26, 2020

Important Linux Commands - Ready Reckoner

Hi All,

In this blog, let me share some commonly used Linux commands which you may find useful in case you do not frequently interact with Linux servers or operating systems.

  • cd /<folder path> - Go inside a particular folder.
  • mkdir <folder name> - Create a new folder or directory with the given name.
  • ls - List the contents of the present directory.
  • rmdir <folder name> - Delete the directory or folder if it is empty.
  • exit - Leave the existing ssh session
  • sudo su - Switch to Super user.

I will keep adding the list based on the frequency of usage. Thanks for reading.

How to get MySQL Shell in Ubuntu/Linux

 Often, we install MySQL Server in Ubuntu or Linux machines and then we tend to forget how to login to MySQL shell. This may happen if we ra...