Installing Elasticsearch in AWS

Installing Elasticsearch is very well documented in the elastic.co site. I installed it in a t2 micro instance for testing purpose. I used the below commands to install it in Ubuntu 20.04. After installing we need to start it as it does not start automatically. So to configure Elasticsearch to start automatically we have to […]

mysqldump for tables with white spaces

The usual command to take a dump for a single table is mysqldump -u root -p dbname tablename > filename.sql But what about table names that have white spaces in between like Order Master? While this kind of naming should be avoided but nevertheless they are perfectly valid. These kind of names are often enclosed […]

MariaDB Full backup and restore

We all are aware of mysqldump which we use in command line to take backups of MySQL/MariaDB databases. However MariaDB has backup solution through mariabackup. It is very easy. Below is the command to take a compressed backup with 7z command. Similarly we can uncompress it and replace the existing MariaDB data directory to restore […]

MSSQL administrator tool

I am a MySQL developer and recently started to work on MSSQL for a project. I use MySQL workbench in local and PhpMyAdmin in servers. I wanted to have similar tools that I could use in local and in the server for MSSQL. I googled and found a nifty tool Adminer. The beauty of this […]

Vertical middle align text in a cell for TCPDF

TCPDF library is one of the recommended libraries to convert html to PDF. It supports most of the styles but not all. Today I came along such an issue. When I was giving a height to the td tag then the text was getting top aligned. I tried with valign=“middle” but no luck. After googling […]

MYSQL select all columns except one

Today a thought occurred to me of how to select all columns except one. I searched and found the answer in stackoverflow. I tried the below answer This gives error when column names contains spaces or – or MySQL keywords.I modified the code a bit and generalized it by adding backticks to the column names. […]

MySQL Integer data types with length

We have come across integer data types like INT, TINYINT etc. While creating/modifying a column we generally give a length to it like INT(10). Today I really found its usefulness. Often it is documented that the length just specifies how many characters to display when selecting data. But the length only works only when the […]

PHP switch AND break

Though switch and break statements have lots of explanation scattered all around the net but there are few concepts which we rarely use. One such thing which I came across today is to use a conditional statement in case. The general syntax for switch is The below syntax is not well known to new programmers i.e. to […]

Reload configuration changes without restarting Apache

It has been a day to day activity to restart Apache when ever there is any change in its configuration files or while changing in php.ini files. But what if someone is viewing our site while we want to restart to make new changes effective. This definitely gives a bad experience to the end users. […]