Upgrade Fedora Core 4 with Mysql 4.14 to MySQL 5.0.15

From AstBillWiki

Jump to: navigation, search

Please note, this will not upgrade your installation of MySQL from 4.x to 5.x.

Better instructions found here: http://bugs.mysql.com/bug.php?id=14141


Hi,

I just can't figure out the following line:

scripts/mysql_install_db --user=mysql

What does this do?

Thanks.


First you have to shutdown your old MySQL 4

mysqladmin -uroot -p shutdown

or You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:
shell> kill `cat /mysql-data-directory/host_name.pid`
Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command. How to install MySQL 5.0.15

mkdir -p /usr/local
cd /usr/local
# See http://dev.mysql.com/downloads/mysql/5.0.html for exact download location
# They sometimes change it.
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-standard-5.0.15-linux-i686.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/

tar zxvf mysql-standard-5.0.15-linux-i686.tar.gz
ln -s /usr/local/mysql-standard-5.0.15-linux-i686 mysql
cd mysql

scripts/mysql_install_db --user=mysql

chown -R root .
chown -R mysql data
chgrp -R mysql .

rename your old my.cnf file. It may contain usefull information about running Mysql on your system.
mv /etc/my.cnf /etc/my4.cnf

Copy the correct my.cnf to the /etc/my.cnf for your system.
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

IMPORTANT: You have to change the following in the file:
/etc/my.cnf

nano /etc/my.cnf

# Fedora and CentOS /var/lib/mysql/mysql.sock

[client]
socket = /var/lib/mysql/mysql.sock

[mysqld]
socket = /var/lib/mysql/mysql.sock

# Apache need access to mysql.sock or mysqld.sock

mkdir -p /var/lib/mysql
chmod 777 -R /var/lib/mysql

to start MySQL:

cd /usr/local/mysql
bin/mysqld_safe --user=mysql &

If mySql is not starting try mysqld to get more error messages
bin/mysqld --user=mysql &

To change the root Password:

bin/mysqladmin -u root password 'mysql_root_pw'

Sometimes you may have to move your old MySQL 4 datadirectory. The location is normaly in your old my.cnf now located in /etc/my4.cnf

The reason for this is not clear. But it sometimes only work if MySQL4 datafiles are not in that location anymore.

If you have more questions, come back to the forum.

I really like to hear if this worked and if there is any error in this instruction Please update.

ARE --

Personal tools