How to view MySQL stored procedure code ?
To view procedure code in mysql, you must be the owner of the routine or have SELECT access to the “mysql.proc” table and you can use any of the following statements. SHOW PROCEDURE CODE proc_name; SHOW CREATE PROCEDURE proc_name; SELECT…
MySQL JDBC Connectivity issues with MemSQL
While testing the connectivity with MySQL JDBC Connector for MemSQL, I’m receiving below errors. My code works fine with MySQL Database but fails with MemSQL Database. Assuming this might be the issue because MemSQL doesn’t have init_connect global variable. Please…
JDBC Driver connectivity test with MySQL
[ root @ dbversity : /var/lib/mysql ] tar -zxvf mysql-connector-java-5.1.36.tar.gz mysql-connector-java-5.1.36/ mysql-connector-java-5.1.36/docs/ –blah blah —– mysql-connector-java-5.1.36/src/testsuite/ssl-test-certs/server-cert.pem mysql-connector-java-5.1.36/src/testsuite/ssl-test-certs/server-key.pem mysql-connector-java-5.1.36/src/testsuite/ssl-test-certs/server-req.pem mysql-connector-java-5.1.36/src/testsuite/ssl-test-certs/test-cert-store [ root @ dbversity : /var/lib/mysql ] [ root @ dbversity : /var/lib/mysql ] [ root @ dbversity : /var/lib/mysql ]…
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…
[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,…