保持快乐,善于表达,敢于创新

mysql install on solaris(sparc) steps

上一篇 / 下一篇  2009-12-13 16:08:51 / 个人分类:mysql database

1. download the required package (tar.gz)
http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.41-solaris10-sparc-64bit.tar.gz/from/pick#mirrors 

the net speed of TAIWAN is better.

2. follow the steps:

shell>groupadd mysql

shell>useradd -g mysql mysql
shell>cd /usr/local
shell>gunzip </path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell>ln -sfull-path-to-mysql-VERSION-OSmysql
shell>cd mysql
shell>chown -R mysql .
shell>chgrp -R mysql .
shell>scripts/mysql_install_db --user=mysql
shell>chown -R root .
shell>chown -R mysql data

shell>bin/mysqladmin -uroot password 'pass'(set superadmin's password)

shell>bin/mysqld_safe --user=mysql &

you must install the path: /usr/local/
note:
 if it can't work, you should add your computer's hostname to it. eg: #mysqladmin -uroot password 'pass' -h 'your_hostname'

refer to the url:
http://dev.mysql.com/doc/refman/5.1/en/installing-binary.html

change the configuration file mysqlaccess , 
$MYSQL     = '/usr/local/mysql/bin/mysql';    # path to mysql executable


3. add the autostart script. to your start boot floder:
  # cp /usr/loacl/mysql/support-files/mysql.server /etc/init.d/
  # cd /etc/rc2.d
  # ln -s ../init.d/mysql.server Kmysqld
  # ln -s ../init.d/mysql.server Smysqld

4. add the mysql bin to the $PATH:
  # cd /etc/
  # vi profile
    PATH=$JAVA_HOME/bin:$PATH:/usr/local/mysql/bin (modify the path as this)

4. create one database:
  #mysqladmin -h solaris10 -uroot -ppass create "db" 
  #mysql -uroot -ppass -h 'your_hostname'
 mysql>CREATE USER 'aaa'@'your_ip' IDENTIFIED BY 'pass';
mysql>GRANT ALL PRIVILEGES ON *.* TO 'aaa'@'your_ip' WITH GRANT OPTION;

refer to http://dev.mysql.com/doc/refman/5.1/en/passwords.html

5. Grant the user remote control:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'WITH GRANT OPTION;
http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

6. the user aaa login the mysql server:
#mysql -uaaa -ppass -h solaris10
  




TAG: MySQL Solaris

 

评分:0

我来说两句

Open Toolbar