Linux and Security

Info Sec and Linux Related Stuff

Skip to content
Menu
  • Tutorials and articles
  • List of Posts
  • Video Tutorials
  • Useful Links
  • Contact Me
  • Home

Category: Database

Database Tutorials and Tips

Database

Setting up PostGresql Replication with Loadbalancing with PGPOOL II

Posted on January 4, 2018 by AKN

Installation (on both Master and Slave Nodes): yum install https://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm yum install postgresql95 postgresql95-server postgresql-libs postgresql95-contrib rsync   Initialize the database and configure postgresql /usr/pgsql-9.5/bin/postgresql95-setup…

MySQL

Running a query without affecting slave

Posted on February 17, 2013 by AKN

Some times, you might want to run a query without slave updating with that query. In that case, you would have to avoid writing the…

Database

MySQL root grant permission denied

Posted on February 9, 2013 by AKN

There are times, when  you may come across this situation, when you are not able to grant permission to a new user, even when you…

MySQL

Shell Script to Check the Status of MySQL Replication

Posted on July 1, 2012January 9, 2013 by AKN

#!/bin/bash emailAddress="emailtoNotify@domain.com" cmd=`mysql -e ‘show slave status\G’ | grep Slave_SQL_Running | awk ‘{print $2}’` if [ "$cmd" == "No" ];then         MSG="Mysql Replication Broken on `hostname`,…

Database

cannot start session without errors

Posted on June 2, 2012June 20, 2012 by AKN

Web server is not able to access your session directory. Change the permissions. chown -R root:apache /var/lib/php/session

MySQL

Mysqldump Tips and Tricks

Posted on January 30, 2012August 31, 2016 by AKN

MySQL Database Backup Ignore one or more tables while doing mysqldump : mysqldump -u username -p database –ignore-table=db.table1 –ignore-table=db.table2 > mysqldump.sql Compress the output of…

MySQL

mysql master master replication with ssl encryption

Posted on January 21, 2012January 9, 2013 by AKN

Lets assume the two servers to be serverA and serverB Create the certificates to use with mysql replication: openssl genrsa 2048 > ca-key.pem openssl req…

MySQL

Sample mysql queries

Posted on November 7, 2011November 29, 2011 by AKN

Delete Rows based on output from a query : DELETE FROM Table1 WHERE EXISTS(SELECT 1 FROM Table2 WHERE Table2.Group = Table1.Group) or delete from Table1…

MySQL

Shell Script to Backup and Rotate Mysql Database

Posted on November 1, 2011November 15, 2011 by AKN

#!/bin/bash #Author : Amit K Nepal #Last Modified : Nov 01 2011 BACKUP_DIR=/db_backups DB_NAME=dbname TSTAMP=`date +%Y%m%d` FILENAME=$BACKUP_DIR/$DB_NAME.gz Notify=1 Rotate=8 logfile=$BACKUP_DIR/backup.log echo “………….Backup Script Running on…

MySQL

Mysql Tips and Tricks

Posted on October 11, 2011December 11, 2013 by AKN

View Mysql Process list with full query : show full processlist \G Disable Binary Logging SET sql_log_bin = 0;

Posts navigation

Page 1 Page 2 Page 3 Next Page

Top Categories

  • Apache (15)
  • Cascading Style Sheet (2)
  • Centos / RHEL 7 (1)
  • Cisco (1)
  • Cloud & Cluster (1)
  • Database (8)
  • FileSystems & Storage (3)
  • Iptables (6)
  • Kamailio (2)
  • Linux (4)
  • Linux – GUI (1)
  • Linux Administration (70)
  • Linux Development & Building (3)
  • Linux Installation (1)
  • Linux Server Configurations (17)
  • Linux Videos (2)
  • Mail Servers (14)
  • Miscellaneous (35)
  • Monitoring (1)
  • MySQL (19)
  • Networking (7)
  • PHP (17)
  • PostFix (5)
  • PostGresql (1)
  • Regular Expressions (2)
  • Security (8)
  • SELinux (1)
  • Shell Scripting (28)
  • Shell Scripts (10)
  • VmWare (5)
  • Voice Over IP (18)
  • Web Apps & Design (2)
  • Windows – Umm. (3)
  • Xen Server (2)
Having issues with your infrastructure ? I can look into your issue and potentially resolve it quickly.
Contact Me!
© Copyright 2018 – Linux & Security
Wisteria Theme by WPFriendship ⋅ Powered by WordPress