Monday, December 31, 2012
MYSQL BINARY INSTALLATION IN LINUX
1.Check your operating system.Whether is it 32 or 64bit?
2.Go to root user.
3.Check the disk space.
4.Create useradd mysql and groupadd mysql.
5.If want to download from the website: go to http://dev.mysql.com/downloads/ > Click MySQL community server >Select the platform > Select the package you need as RPM or Binary
(http://dev.mysql.com/downloads/mysql/#downloads) > Select download > It goes to next page in that,right click on No,Thanks option > copy download link.
6.Now go to terminal and type,
wget --paste the copied link--
7.Now the MySQL download starts.
8.After (Binary)download.It will be in tar file.
9.Extract the tar file using :
tar -xvzf mysql.tar.gz
10.If already you have MySQL in your system no need to download from net,check the MySQL path.
11.Then copy the extract file or already have MySQL in system to user directory.
cp -r mysql /usr/local/
12.After copy, go to /usr/local/mysql to change the owner and group name of mysql.
chown -R mysql.mysql /usr/local/mysql/
13.Now create a data directory.
mkdir /data/mysqldata/
cd /data/mysqldata/
14.Change the owner and group name of mysqldata.
chown -R mysql.mysql /data/mysqldata/
15. Now go to /usr/local/mysql/ directory to copy the supported files to my.cnf
cd /usr/local/mysql/
cp support-files/my-small.cnf /etc/my.cnf
16.Now install mysql using,
./scripts/mysql_install_db --/defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/datamysqldata/ -user=mysql
17.Installtion finished succesfully.Now give a command to start the mysql in safe way use.
./bin/mysqld_safe --/defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/mysqldata/ -user=mysql &
18.Then copy the mysql server support files to /etc/init.d/mysql.
cp support-files/mysql.server /etc/init.d/mysql
19. Edit the /etc/init.d/mysql file to give the base and data directory file location.
vi /etc/init.d/mysql
basedir= /usr/local/mysql/
datadir=/data/mysqldata/
20.Check the mysql status whether its running or not using and check the log error.
/etc/init.d/mysql status
To start and stop MySQL:
/etc/init.d/mysql start
/etc/init.d/mysql stop
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment