Tutorials >> MySQL >> 5.x >> How to install MySQL in Solaris

# cd /var/tmp/mysql

# gunzip mysql-5.5.19-solaris10-i386.tar.gz

# mkdir -p /usr/local

# cd /usr/local

# tar xvf /var/tmp/mysql/mysql-5.5.19-solaris10-i386.tar.gz

# chown -R mysql:mysql /usr/local/mysql-5.5.19-solaris10-i386

# ln -s mysql-5.5.19-solaris10-i386 mysql

# chown -R mysql:mysql mysql

# cd mysql

# ./scripts/mysql_install_db --user=mysql

# cp /usr/local/mysql/support-files/my-medium.cnf  /etc/my.cnf

# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql

start & stop

/etc/init.d/mysql start

/etc/init.d/mysql stop

change passwd by

 ./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h `uname -a` password 'new-password'
 

autostart/autostop scripts

# cp /etc/init.d/mysql /etc/rc3.d/S40mysql
# chown root:sys /etc/rc3.d/mysql
# cp -p /etc/rc3.d/S40mysql /etc/rcS.d/K26mysql
# cp -p /etc/rc3.d/S40mysql /etc/rc0.d/K26mysql
# cp -p /etc/rc3.d/S40mysql /etc/rc1.d/K26mysql
# cp -p /etc/rc3.d/S40mysql /etc/rc2.d/K26mysql