miércoles, 1 de diciembre de 2010

Mysql 4 y Mysql 5 (Mysql Community Server) en paralelo

Se da por entendido que en el servidor esta previamente mysql-4 con la configuracion basica instalado desde el manejador de paquetes del S.O.

1.- Descargar mysql community server (mysql-5.1.X) de la pagina oficial y descompactarlo.

tar zxvf mysql-5.1.X.tar.gz

2.- Compilar e instalar

./configure --prefix=/var/lib/mysql5 --with-unix-socket-path=/var/lib/mysql5/mysql5.sock --with-tcp-port=3307

make

make install

3.- Crear el archivo de conf my5.cnf (Verificar los permisos para el usuario mysql


# Example MySQL config file for large systems.
## This is for a large system with memory = 512M where the system runs mainly MySQL.
## You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql5/var) or
# ~/.my.cnf to set user-specific options.
## In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
#[client]
#password = your_password
#port = 3307
#socket = /var/lib/mysql5/mysql5.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3307
socket = /var/lib/mysql5/mysql5.sock
old_passwords=1
skip-locking
key_buffer = 128M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
[mysql.server]
user=mysql
[mysql]
default-character-set=latin1
[mysqld_safe]
err-log=/var/log/mysqld_5.log
pid-file=/var/lib/mysql5/mysqld5.pid


4.- Instalar el directorio de la base de datos

./scripts/mysql_install_db --defaults-file=/etc/my5.cnf --user=mysql


5.- Iniciar mysql5

/var/lib/mysql5/bin/mysqld_safe --defaults-file=/etc/my5.cnf --user=mysql &


6.- Agregar passwd al usuario root

/var/lib/mysql5/bin/mysqladmin -u root password PASSWORD

No hay comentarios: