Install MySQL 5.0.51a from the binary tar.gz package
MySQL offers for download several precompiled types of packages for installation (rpm’s for various distros, tar.gz, etc.). This post will show how you can install the latest version of mysql5.0 available at this time 5.0.51a from the binary tar.gz distribution.
Fist you need to download somewhere on your system the tar.gz package from mysql (I will assume you have done this inside /usr/local/src/), mysql-5.0.51a-linux-i686-glibc23.tar.gz from the closest mysql mirror to your location. If you are running a different architecture, please download the appropriate file.
Next, let’s create the mysql user and group:
groupadd mysql
useradd -g mysql mysql
And continue with the actual installation:
cd /usr/local
gunzip < /usr/local/src/mysql-5.0.51a-linux-i686-glibc23.tar.gz | tar xvf -
ln -s mysql-5.0.51a-linux-i686-glibc23 mysql
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
The mysqld binary will search for configuration file under: /etc/my.cnf, <datadir>/my.cnf and <basedir>/my.cnf . You can start with one of the supplied configs (my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf or my-innodb-heavy-4G.cnf) and customize it accordingly to your needs. I chosen to put this one under /usr/local/mysql, so I can have more mysql instances running, each with its local my.cnf:
cp support-files/my-medium.cnf my.cnf
vim my.cnf
Once you are happy with the config you can start mysql manually using:
bin/mysqld_safe --user=mysql &
You can stop it manually with:
/usr/local/mysql/bin/mysqladmin shutdown
Once you are satisfied with everything you can setup mysql to start automatically at system boot time. You can use for this the supplied mysql.server from support-files folder.
>
Tags: mysql

5th August 2008, 06:52
I get this message
# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080805 09:50:24 mysqld ended
5th August 2008, 08:47
Check your mysql logs for any additional information on what is the problem. The information you provided doesn’t say anything about the actual problem. hth, M.
26th February 2009, 20:06
I ran the following to complete my installation:
[root@fj mysql-standard-5.0.22-linux-i686]# scripts/mysql_install_db –user=mysql
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password ‘new-password’
./bin/mysqladmin -u root -h fj.localhost password ‘new-password’
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the ‘sql-bench’ directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[root@fj mysql-standard-5.0.22-linux-i686]#
[root@fj mysql-standard-5.0.22-linux-i686]# chown -R root .
[root@fj mysql-standard-5.0.22-linux-i686]# chown -R mysql mysql_data
chown: cannot access `mysql_data’: No such file or directory
[root@fj mysql-standard-5.0.22-linux-i686]# chown -R mysql data
[root@fj mysql-standard-5.0.22-linux-i686]# chgrp -R mysql .
[root@fj mysql-standard-5.0.22-linux-i686]#
ERROR STARTED HERE:
[root@fj mysql-standard-5.0.22-linux-i686]# bin/mysqld_safe –user=mysql &
[1] 19312
[root@fj mysql-standard-5.0.22-linux-i686]# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
090226 19:27:34 mysqld ended
Am stuck now…
I appreciate your help!
26th February 2009, 23:43
@folatutor: why are you using such an old version? I would try with the latest release. In anycase from your output there is no way to see what is the problem. You should try to see if it logs anything useful in the logs to try to understand what is the real problem. Paste the error, and I will try to help
8th January 2012, 16:30
To install on RedHat 6.2, which version is the right version to down, generic linux version of mysql or oracle linux version of mysql? I don’t see redhat linux in the download versions.
Thanks in advance!
Victor
8th January 2012, 16:51
@victor: this is really outdated version. You should use the latest version available (like 5.5.19). If your distro is not listed use the generic linux binary.
8th January 2012, 19:07
Thx. I just can’t find the page for 5.5.19 I will try to download mysql 5.6 generic linux version to install on RHEL 6.2 in IBM x3650. Is there any other mysql version better than the generic linux version as far as RHEL is concerned?
Victor