Leeladharan Achar - alias - leelu ~ blogging...hola mi amigos.. The Blog

Leeladharan Achar - leelu Blog. Hola mi amigos!

Drop a PostgreSQL database if there are active connections to it

When you are trying to drop a PostgreSQL DB say "target_db" and you find error as below

 postgres=# DROP DATABASE target_db; ERROR: database "target_db" is being accessed by other users DETAIL: There is 1 other session using the database. postgres=# 

If you get above error then there 1 active connection opened to target_db, so it cannot delete the ...

More ...

PostgreSQL Cross Database Queries using DbLink

In this post I am going to show you that how we perform cross database query in PostgreSQL.

Like MSSQLServer, MySQL database, you can select data from one database to another database. What we are doing is we simply select data using database_name.schema.table. In PostgreSQL you cannot perform the cross database query like other database technology.

In this post I ...

More ...

Installing and Enabling mod_geoip2 on Apache 2 (centOS 7)

To install mod_geoip2 extension for Apache2 please follow below steps

Make sure you have gcc installed

Execute below command to install all development tools (which includes gcc as well)

yum groupinstall 'Development Tools' 

Now let's install GeoIP development package

yum install geoip-devel 

If above package is not installed then you might get Error as below , when you ...

More ...

Installing PyCharm Community on 32 or 64 bit Fedora 21/22/23

As root user, create a file pycharm.repo in /etc/yum.repos.d/

vi /etc/yum.repos.d/pycharm.repo 

and add below content and save the .repo file

[phracek-PyCharm] name=Copr repo for PyCharm owned by phracek baseurl=https://copr-be.cloud.fedoraproject.org/results/phracek/PyCharm/fedora-$releasever-$basearch/ skip_if_unavailable=True gpgcheck=1 gpgkey=https://copr-be.cloud.fedoraproject.org/results/phracek/PyCharm/pubkey.gpg enabled=1 enabled_metadata=1 

Now to install pycharm community version, execute below commands

dnf copr enable phracek/PyCharm dnf install pycharm-community 

That's all thanks :)

More ...

MySQL master-slave replication

Step-by-step: how to setup MySQL Database replication

This tutorial will go through the setup of MySQL database replication. I will also talk about how to get everything working smoothly again after a server crash, or if you wish to switch databases. I will try to explain what is going on behind the scenes for every step (something I've found missing ...

More ...