Archive for the ‘Mysql’ Category

  • Upgrading MySQL from 4 to 5

    Saturday, August 14th, 2010

    MySQL upgradation is a simple process of removing old binaries and installing the new one. Following is a process of how to upgrade MySQL 4.1 to MySQL 5 on RHAS 4 Note: Before going to upgrade your database take a backup of your database and /etc/my.cnf file. Now find out the current packages Installed on [...]

  • InnoDB: The InnoDB memory heap is disabled

    Thursday, July 29th, 2010

    I enabled the innodb_plugin-1.0.4 made the necessary changes into the my.cnf file to bring the innodb plugin into the effect . Restarted MySQL and got the log entry into the MySQL error log InnoDB: The InnoDB memory heap is disabled , on some checking I got in this page (http://www.innodb.com/doc/innodb_plugin-1.0-doc-single/innodb-plugin.html#innodb-performance-use_sys_malloc) that I need to set [...]

  • InnoDB: Fatal error: cannot allocate the memory for the buffer pool

    Thursday, July 29th, 2010

    I got this error while I was trying to setup a MySQLServer as Copy of another server I did not check the memory available in the system and I got the error “InnoDB: Fatal error: cannot allocate the memory for the buffer pool” I realized that the memory of the system is less then the [...]

  • Accessing Remote Tables Data in MySQL

    Friday, July 16th, 2010

    We sometime need to access the data (tables ) which lies on another remote MySQL DB Server , MySQL provides an engine type federated which does exactly what we want . The FEDERATED storage engine enables data to be accessed from a remote MySQL database on a local server without using replication or cluster technology. [...]

  • Monitoring DML Stats per table in MySQL

    Monday, July 12th, 2010

    Most of time as an MySQL admin we need to keep track of the DML statements  per table , If we are not using any specific tool for doing this We can use the shell script for doing this which I came across the idea is to use the binlog to get all of the [...]

  • MySQL Replication Monitoring

    Thursday, July 8th, 2010

    MySQL Replication is widely and we need to have strong replication monitoring for these things 1) To monitor if the replication is working. 2) To check the latency between the master and slave . 3) TO check the consistency between the master and slave , as sometime due to manual or master server crash , [...]

  • PHP 5.3 ,MySql 5.1 on RHEL 4

    Tuesday, July 6th, 2010

    For those who are still using RHEL 4.x and in need of deploying PHP 5.3 & MySQL 5.1 , you can get the required rpm packages from http://rpms.famillecollet.com/enterprise/4/ You can add the repo and update php and MySQL packages via yum, or download and install manually. I think the bare minimum will require these packages [...]

  • Mysql Master Slave Replication

    Friday, July 2nd, 2010

    MySql replication scenario Solves a.)One of the biggest advantages to have master-slave set up in MySQL is to be able to use master for all of the inserts and send some, if not all, select queries to slave. This will most probably speed up your application without having to diving into optimizing all the queries [...]

  • How to Install Munin on CentOS

    Friday, June 18th, 2010

    Introduction:- Munin is a highly flexible and powerfull solution used to create graphs of virtually everything imaginable throughout your network, while still maintining a rattling easy of installation and configuration. Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed [...]

  • InnoDB: Unable to lock ./ibdata1, error: 37

    Tuesday, June 1st, 2010

    InnoDB: Unable to lock ./ibdata1, error: 37 I recently faced the “error  InnoDB: Unable to lock ./ibdata1, error: 37 “ while moving my data directory to NFS from local disk , when I restarted the mysql , the restart failed and I got the error in the error log , all permissions were set properly [...]

  • Loading CSV File into Mysql database

    Monday, May 3rd, 2010

    LOAD DATA  LOCAL INFILE ‘/home/user/www/upload/upload.csv’ INTO TABLE smstobesent  FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\\n’ (name,contact_no) $file_name=/home/user/www/upload/upload.csv Load csv file into database using php script $rs=mysql_query(“LOAD DATA  LOCAL INFILE ‘$file_name’ INTO TABLE smstobesent  FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\\n’ (name,contact_no)”) or die(“Error in Load File: “.mysql_error()); I had tried to run  command [...]

  • COLUMNS Partitioning in Mysql 5.5

    Sunday, April 18th, 2010

    Introduction:- COLUMNS Partitioning  in Mysql 5.5 New   partition type COLUMNS Partitioning is introduced   in  MySQL 5.5 beta released in the MySQL Conference 2010 Columns Partitioning is extension of the list and range partition introdued in the MySQL 5.0 (  http://onaxer.com/blog/?p=108) Major Feature of the Column Partitioning 1)    It allows use of multiple columns to be [...]

  • How imports historical Nagios log files into the mysql database

    Friday, March 5th, 2010

    NDO Utilities:- The NDO utilities add-on, written by Nagios developer Ethan Galstad, is designed to output events and data from Nagios to standard files or to a Unix socket. It also comes with a module called NDO2DB that allows Nagios data to be written to a MySQL or PostgreSQL database The add-on is made up [...]

  • Mysql slave giving duplicate entry error

    Thursday, March 4th, 2010

    We can remove the duplicate entry error on slave by running below command on slave. If we will not removed the Duplicate errors from the slave, replication will be stopped. stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave; show slave status\G; Thanks Manoj Chauhan

  • Mysql Server Backup and Failover

    Sunday, January 24th, 2010

    The solution will comprise of two database servers and an application server. At any instant of time one database server would act as active master allowing writes and both database servers will be able to serve reads. Application server will be writing and reading from preconfigured IPs for writes and reads. Mysql Server Backup and [...]