Assumptions:
- MySQL version 3.22.32
- MySQL tarball downloaded into a dir named /home/_installer/mysql
- Hardware has Red Hat Linux operating system.
- User has root privileges.
1.0 Unpacking MySQL
# cd /home/_installer/mysql
# gzip -dc mysql* | tar xvf -
# mv mysql-3.22.32-pc-linux-gnu-i686 /usr/local
# cd /usr/local
# chown -R root:root mysql-3.22.32-pc-linux-gnu-i686
# ln -s /usr/local/mysql-3.22.32-pc-linux-gnu-i686 /usr/local/mysql
2.0 Configuring MySQL
note: assumes current directory is /usr/local
# cd mysql
# scripts/mysql_install_db
3.0 Starting the Server Manually
note: assumes current directory is /usr/local/mysql
# bin/safe_mysqld &
# bin/mysqladmin ping
mysqld is alive
4.0 Configuring MySQL root user
# bin/mysqladmin -u root password rootpassword
note: for our purposes, "rootpassword" is made similar to the system root password!
5.0 Testing access
# bin/mysql -uroot -p
mysql>use mysql;
mysql>select * from db;
mysql>quit
6.0 Automatic MySQL Start-up during boot
# cd /usr/local/mysql
# cp support-files/mysql.server /etc/rc.d/init.d
note: to startup MySQL during system boot
# cd /etc/rc.d/rc3.d
# ln -s ../init.d/mysql.server S98mysql
# cd /etc/rc.d/rc5.d
# ln -s ../init.d/mysql.server S98mysql
note: to shutdown MySQL during system shutdown
# cd /etc/rc.d/rc0.d
# ln -s ../init.d/mysql.server S98mysql
# cd /etc/rc.d/rc6.d
# ln -s ../init.d/mysql.server S98mysql
note: make /etc/rc.d/init.d/mysql.server executable
# cd ../init.d
# chmod +x mysql.server
That's it!
-oOo-
Back to Tips and Tutorials