ODBC Connector installation & connectivity test for MySQL
Please check your OS version and bit type and download the required ODBC Driver for MySQL from http://dev.mysql.com/downloads/connector/odbc/ [ root @ myhostname : ~ ] cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) [ root @…
[MariaDB]: Galera Cluster installation
You can download MariaDB Galera Linux package from the link https://downloads.mariadb.org/mariadb-galera/10.0.20/#os_group=linux_generic [ root @ maria-galera : /mariadb ] ll -lhtr total 142M -rw-r–r– 1 root root 142M Aug 11 08:18 mariadb-galera-10.0.20-linux-x86_64.tar.gz [ root @ maria-galera : /mariadb ] […
[MariaDB]: Installation from Linux tar ball
You can download mariadb package from https://downloads.mariadb.org/ and copy to your linux box [ root @ vm-16af-8253 : /mariadb ] ll -lhtr total 296M -rw-r–r– 1 sm70768 mongod 296M Aug 11 01:38 mariadb-10.0.21-linux-x86_64.tar.gz [ root @ myhostname : /mariadb ]…
[MySQL]: Filtering replication by Column is possible ?
We can restrict table level replication with below parameters in MySQL Solutions for column level are … 1) Custom script • Export data with required fields to a csv from Master server ( with SELECT INTO OUTFILE syntax) • Create…
[MemSQL]: Installation with Ops Manager
[Dev root @ dbversity1host~]# ll -lhtr total 164M -rw-r–r– 1 root root 149M Jul 30 09:59 memsqlbin_amd64.tar -rw-r–r– 1 root root 15M Jul 30 09:59 memsql-ops-4.0.31.tar [Dev root @ dbversity1host~] [Dev root @ dbversity1host~]# mkdir /memsql [Dev root @ dbversity1host~]…
[MySQL]: Replication monitoring alert script
[ root @ dbversity : ~ ] cat Slave_status.sh #!/bin/bash LOGFILE=slavestatus.log mkdir -p /binlogs/cronjobs/Error_Log yum -y -q mail ## ======================================================= **********SLAVE STATUS************* ======================================================================= array=(10.x.xx.xx) for i in “${array[@]}” do #mysql -h$i -umonitor -p’password’ -e”show slave status\G” > /binlogs/cronjobs/Error_Log/$i_Slave_Status.txt 2>/binlogs/cronjobs/Error_Log/$i_Slave_Status.txt mysql…
[PostgreSQL]: YSCB Benchmarking
[ postgres @ dbversity : /YCSB-master ] ls -lhtr total 2.4M -rw-r–r– 1 postgres postgres 479 Aug 18 2014 NOTICE.txt -rw-r–r– 1 postgres postgres 7.9K Aug 18 2014 LICENSE.txt -rw-r–r– 1 postgres postgres 2.6K Aug 18 2014 CHANGELOG drwxrwxrwx 2…
[PostgreSQL]: How to check Replication lag
We can calculate the replication lag by comparing the current WAL write location on the primary with the last WAL location received/replayed by the standby. They can be retrieved using pg_current_xlog_location on the primary and the pg_last_xlog_receive_location/pg_last_xlog_replay_location on the standby,…
[PostgreSQL]: Replication setup
Postgres installation : [ root @ masterhost : ~ ] yum install postgresql postgresql-server http://guegs3.nam.nsroot.net/SOELinux/repos/prod/soe6gdeproducts-x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404 Not Found” Trying other mirror. Setting up Install Process Resolving Dependencies –>…
[MySQL]: How to split a string into multiple columns in a SQL statement
mysql> select * from test; +——+———————+ | id | name | +——+———————+ | 1 | /root/path/to/leaf | | 1 | /var/lib/mysql/data | +——+———————+ 2 rows in set (0.00 sec) mysql> mysql> select id,name, SUBSTRING_INDEX(name, ‘/’, 2) as first_val, SUBSTRING_INDEX(name,…