-   Linux - Newbie (
-   -   Steps to install MYSQL as non-root user (

rajesh22 05-03-2011 04:56 AM

Steps to install MYSQL as non-root user
Hi all,

I like to share you all how to install mysql binary installation as non-root user.

Step:1 Download mysql binary package from mysql website.

Step:2 change the ownership for folder mysql $ chown mysql:mysql /usr/local/mysql ( only this step should be done by root user)

Step:3 $ move the downloaded tar file to /usr/local/mysql and tar -zxvf <filename>.tar.gz

Step:4 $scripts/mysql_install_db --user=mysql ( mysql database got installed)

Step:5 Starting mysql services: $ ./bin/support-files/mysql.server start

Step:6 Login to mysql database $./bin/mysql -u root -p

Step:7 To stop services $ ./bin/support-files/mysql.server stop

You can try and provide feedback.we are ready to help you ;)


kirukan 05-03-2011 05:09 AM

This is the way I follow, Installation not so difficult because there should be README or Installation file in most of the source packages..

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

All times are GMT -5. The time now is 06:02 PM.