[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] mysql 4 package?
- Subject: RE: [cobalt-users] mysql 4 package?
- From: desa15@xxxxxxxx
- Date: Tue Jan 20 07:47:01 2004
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
In first place excuse my very bad English
Migrate from MySQL 3.23.56-Max to 4.0.16
in a Cobalt Raq 550
In first place is very necesary make a backup of the databases
cp -r /var/lib/mysql /home/admin/backup_mysql
MySQL4 use a diferent system to index the data, make a text file with a
data and table structure
mysqldump -uroot -ppassword --all databases >
/home/admin/backup_mysql/backup.sql
mysqladmin -uroot -ppassword shutdown (shutdown database engine)
cd /usr/local/download
Download the precompiled version, is the best.
wget www.mysql.com/Downloads/MySQL-4.0/mysql-4.0.16.tar.gz (is a unreal
path)
tar zxvf mysql-4.0.16.tar.gz (decompress)
mv mysql-4.0.16 mysql
cd mysql
#Only if you download the source code version
#Begin
./configure --prefix=/usr/local/mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock
--with-mysqld-user=mysql
make
make install
#End
chown mysql.mysql /usr/local/mysql
scripts/mysql_install_db (install default database)
Rename the 3.23.56 binaries to _old
for file in *; do mv /usr/local/mysql/bin/$file /usr/bin/$file_old; done
Make the links to the new binaries
for file in *; do ln -s /usr/local/mysql/bin/$file /usr/bin/$file; done
chown -R mysql.mysql /var/lib/mysql
chmod 755 /var/lib/mysql
Start the new engine
/usr/local/mysql/bin/safe_mysqld &
Press Ctrl + C
Copy the new start script
cp support-files/mysql.server /etc/rc.d/init.d/mysql
vi /etc/init.d/mysql
#Paths to modify only for cobalt
-----------------------------------------------------------------------------
basedir=
# The following variables are only set for letting mysql.server find
things.
# Set some defaults
datadir=/var/lib/mysql
pid_file=
if test -z "$basedir"
then
basedir=/
bindir=/usr/bin
else
bindir="$basedir/bin"
fi
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
export PATH
-----------------------------------------------------------------------------
chkconfig --level 3 mysql on
chkconfig --level 0 mysql off
My /etc/my.cnf (some keys has changed in the new version)
[client]
user=mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
socket =/var/lib/mysql/mysql.sock
datadir =/var/lib/mysql
skip-locking
set-variable = max_connections=250
set-variable = key_buffer=64M
set-variable = max_allowed_packet=1M
set-variable = table_cache=256
#BEGIN MySQL 4.01
set-variable = sort_buffer_size=1M
set-variable = read_buffer_size=1M
thread_cache = 8
query_cache_size= 16M
thread_concurrency = 8
#END Mysql 4.01
set-variable = net_buffer_length=8K
set-variable = myisam_sort_buffer_size=32M
set-variable = wait_timeout=14400
set-variable = connect_timeout=10
set-variable = max_connect_errors=10
#Desactivamos los logs porque lo unico que hacen es ocupar
#log-bin
#log
server-id = 1
skip-innodb
Un saludo, Danny