Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Peter Cooperx http://www.petercooper.co.uk/

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

How to install MySQL 5.0 on RHEL 4

RedHat Enterprise Linux 4 comes with MySQL 4, so it needed to be upgraded. I did it the following way. I am not responsible for anything that happens if you follow these instructions, so please understand what they do!

Make sure to replace the wget RPM downloads with the correct RPMs for your platform! These ones are for AMD/Intel 64 bit (non Itanium)..

   1  
   2  service mysqld stop
   3  cd ~
   4  mkdir mysql
   5  cd mysql
   6  wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-server-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
   7  wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-client-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
   8  wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-shared-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
   9  wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-devel-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
  10  rpm -Uvh --nodeps MySQL-server-standard-5.0.22-0.rhel4.x86_64.rpm
  11  rpm -Uvh MySQL-client-standard-5.0.22-0.rhel4.x86_64.rpm
  12  rpm -Uvh MySQL-shared-standard-5.0.22-0.rhel4.x86_64.rpm
  13  rpm -Uvh MySQL-devel-standard-5.0.22-0.rhel4.x86_64.rpm
  14  nano -w /etc/my.cnf
  15  # Comment out the base-dir line under [mysqld.server] - RHEL 4 / MySQL bug
  16  adduser mysql
  17  chown -R mysql:mysql /var/run/mysqld
  18  chown -R mysql:mysql /var/lib/mysql
  19  service mysql start
  20  mysql

Rebuild indexes on a table with MySQL

   1  REPAIR TABLE tbl_name QUICK;
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS