Postfix Virtual

MYSQL INSTALLATION & CONFIGURATION

# cd /usr/local/src
#wget -c http://mysql.he.net/Downloads/MySQL-4.0/mysql-4.0.24.tar.gz

Create mysql user and group
#groupadd mysql
#useradd -g mysql mysql

Unpack mysql archive
# tar -zxf mysql-4.0.24.tar.gz
#cd mysql-4.0.24/

Configure mysql with /usr/local/mysql base directory
#./configure --prefix=/usr/local/mysql
Build source files
#make
Install compiled files to the directory specified in prefix
#make install
Mysql uses a configuration file to determine some parameters on startup. It must be modified depending on your machine's capacity. Copy mysql configuration file and startup script for a medium sized system to /etc/my.cnf .  Read my-*.cnf files for your own system on the untarred location of MySQL. Those files allow you to chose which file to use for your system.
#mkdir /etc/mysql/
#cp support-files/my-medium.cnf /etc/mysql/my.cnf
#cp support-files/mysql.server /etc/init.d/
#chmod 755 /etc/init.d/mysql.server

Go to base directory and create MySQL grant tables with mysql user (If this MySQL is your second
MySQL installation in your linux, defaults-file variable can be set to your new conf file)

#cd /usr/local/mysql
#bin/mysql_install_db --user=mysql

Change ownership of binaries to root and ownership of data directory to mysql user
#chown -R root  .
#chown -R mysql var
#chgrp -R mysql .

Introduce new libraries to our Linux
#echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
#ldconfig Start MySQL daemon
#/etc/init.d/mysql.server start

Connect to the MySQL server and give mysql root password. Since, there is no default root password
Please pay attention to this part, I have seen many who don't give any root password to their servers.

#/usr/local/mysql/bin/mysql -u root

SET MYSQL PASSWORD

mysql> use mysql;
mysql> update user set password=Password(' 1234 ') where user='root';
mysql> flush privileges;
mysql>\q

CREATE PATH VARIABLES

#PATH=$PATH:/usr/local/mysql/bin
#export PATH
#echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
#echo " export PATH" >> /etc/profile

MySQL is ready congratulations...

 

About Me |Contact Me | ©2006 Genco (Please refer my page if you use any document in this site) (update 03.06.2006)