Archive for the ‘mysql’ Category

Upgrade MySQL to MySQL 5.1 in a Cpanel server

Wednesday, June 17th, 2009

First ascertain the current version of mysql installed, the system architecture and OS release

rpm -qa|grep -i mysql
MySQL-devel-5.0.81-0.glibc23
MySQL-shared-5.0.81-0.glibc23
MySQL-client-5.0.81-0.glibc23
MySQL-server-5.0.81-0.glibc23
MySQL-bench-5.0.81-0.glibc23
arch
x86_64
cat /etc/redhat-release
CentOS release 5.3 (Final)

Next step is to download the latest MySQL 5.1 community release matching the OS and architecture from
http://dev.mysql.com/downloads/mysql/5.1.html#downloads

wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.35-0.rhel5.x86_64.rpm/from/http://mirror.csclub.uwaterloo.ca/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-client-community-5.1.35-0.rhel5.x86_64.rpm/from/http://mirror.csclub.uwaterloo.ca/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-community-5.1.35-0.rhel5.x86_64.rpm/from/http://mirror.csclub.uwaterloo.ca/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-community-5.1.35-0.rhel5.x86_64.rpm/from/http://mirror.csclub.uwaterloo.ca/mysql/

The download folder should look something like

ls
./ MySQL-client-community-5.1.35-0.rhel5.x86_64.rpm MySQL-server-community-5.1.35-0.rhel5.x86_64.rpm
../ [...]

MySQL master slave replication of multiple databases

Sunday, June 14th, 2009

On the master server :
We have to enable networking ;if it is skipped. Enable binary logging and start a binary log of all databases
Add the following to the my.cnf file and restart MySQL

server-id = 1
log-bin=mysql-bin
binlog-do-db=gnusys_kb
binlog-do-db=gnusys_wiki
binlog-do-db=powerdns

create a user on the master with replication slave privileges on all databases from [...]

Upgrade mysql to latest version in parallels plesk

Monday, January 26th, 2009

Note: It is good practice to back up your data before installing any new version of software. Although MySQL has done its best to ensure a high level of quality, you should protect your data by making a backup. MySQL generally recommends that you dump and reload your tables from any previous version to upgrade [...]

mysqlhotcopy a low resource consuming mysql backup

Monday, May 12th, 2008

mysqlhotcopy is a perl script that can backup mysql databases using the MyISAM engines(InnoDb is not supported!) in a faster and efficient way
Following is a simple script to backup all your database to a directory (Preferably this directory should be in a hard drive different from your mysql databases so that there is no data [...]