Tuesday, July 17, 2012

Install and Configure MySQL using Generic Unix or Linux Binaries

Oracle provides the Generic binaries in the form of tar files. Using generic binaries you will be able to control the configuration and layout.

The MYSQL compressed tar files have names of the form mysql-version-OS.tar.gz.

Generic Unix/Linux Binaries Installation layout
Directory  Contents of Directory
bin            Client programs and the mysqld server
data          Log files, databases
docs         Manual in Info format
man          Unix manual pages
include     Include (header) files
lib            Libraries
scripts      mysql_install_db scripts
share        Miscellaneous support/sample configuration/Install files, including error messages
sql-bench Benchmarks

Before you install, make sure that there are no previous versions of mysql, unless you want to use older version of MySQL.

Command to find old rpms installed on the system
# rpm -qa | grep -i ^mysql
Command to find old mysql directories/files
# Find . –name *mysql* -print
Command to find mysql server process
# ps –ef | grep mysql

Follow the steps to Install and configure MySQL

1. Create mysql user and group
# groupadd -g 100 mysql
# useradd -u 100 -s ksh -d /u01/mysql -r -g mysql mysql
# chown -R mysql:mysql /u01/mysql

2. Login as Mysql and unpack the distribution
# su – mysql
$ tar zxvf /u01/mysql-5.0.45.tar.gz
Create a soft link to 5.0.45
# ln -s /u01/mysql/mysql-5.0.45 5.0.45

3. Create a profile and set the profile
-----.profile file----
MYSQL_BASE=/u01/mysql; export MYSQL_BASE
MYSQL_HOME=/u01/mysql/5.0.45; export MYSQL_HOME
Set the profile
$ . ./.profile

4. Copy sample configuration file and edit the file according to your environment.
$ cp /u01/mysql/5.0.45/support-files/my-small.cnf $MYSQL_HOME/my.cnf
-----my.cnf file----



5. Create mysql database files for mysql server.
$ scripts/mysql_install_db --datadir=/u01/mysql/5.0.45/data --basedir=$MYSQL_HOME

This command creates the default database schemas

6. Start the MySQL Server
$ mysqld_safe --defaults-file=$MYSQL_HOME/my.cnf &

Here we have placed the my.cnf under MYSQL_HOME. You can copy the configuration file to any location and use the path while starting the mysql server.

7. Verify the Mysql process and logs
$ ps –ef  | grep mysql

Verify the error log (log-error=/u01/mysql/mysqld.log) under the path that you mentioned in the my.cnf

Satishbabu Gunukula


  1. We take charge with 24/7 Emergency Alarm response notification you have an option with us to do it yourself or have a monitoring supervisor do it for you. we believe in providing Tailored security as per each individual client.
    Help is only a button press away – all our operators speak with the user directly through the Medical Alert. No landline or installation required – Product arrives ready to use.
    Mobile Medical Alert System enables the user to alert an Emergency wherever, whenever. Automatic Fall Detection features, incase you can't press the button. Magnetic charger and voice activation for the partially sighted and those with dexterity.
    Download our APP for Android & IOS – Suitable for Family members or carers. Receive instant SOS and Fall notifications wherever, whenever. Have full control over your loved one's preferences and talk directly to user through your smartphone to the Medical Alert System. Brahma Yoga corporate wellness programs in Gurgaon

  2. This is my first time i visit here. I found so many interesting stuff in your blog.From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work.
    Parallel Desktop Crack

  3. I think this is one of the most vital info for me. And i am glad reading your article.Good job, cheers!
    Cracked Mac Apps


  4. Remarkable! Its in fact remarkable paragraph, I have got much clear idea concerning from this article.I see something really special in this internet site.






  5. I like the helpful information you provide in your articles.I’ll bookmark your blog and test once more right here regularly.I am relatively sure I’ll be told a lot of new stuff right right here! Good luck for the next!
    Any Video Converter Crack
    ESET Internet Security Crack
    VueScan Crack
    Smadav Pro Crack
    Minecraft Crack
    KeyShot Pro Crack
    Avast Antivirus Crack