Chinaunix

标题: mysql intel 8 在solaris9下最基本的安装与测试过程 [打印本页]

作者: wjlxsl    时间: 2004-08-03 11:59
标题: mysql intel 8 在solaris9下最基本的安装与测试过程
在http://www.sunfreeware.com/上找不到mysql for intel 9的。
只好下for intel 8的试试。
下载时系统提示有几个相关联的依赖包。也一起载下来。
mysql-3.23.45-sol8-intel-local.gz   
gcc-3.0.3-sol8-intel-local.gz
ncurses-5.3-sol8-intel-local.gz
zlib-1.1.4-sol8-intel-local.gz
先解包,再安装。
gzip -d
pkgadd -d

系统在安装的过程中倒没有出现什么异常,提示安装成功。先测试一下。
mysql系统默认安装的path为/usr/local/mysql
运行/usr/local/mysql/bin/mysql_install_db
bash-2.05# /usr/local/mysql/bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
040601 16:02:06  /usr/local/mysql/libexec/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/local/mysql/bin/mysqladmin -u root -p password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h sunos -p password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/safe_mysqld &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

增加mysql组与用户
groupadd mysql
useradd -g mysql mysql
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql

#启动mysql服务
/usr/local/mysql/bin/safe_mysqld --user=mysql &  

查看服务端口是否打开
bash-2.05#netstat -an|grep 3306
      *.3306               *.*                0      0 65536      0 LISTEN
启动mysql
bash-2.05#/usr/local/mysql/bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 3.23.45

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>; quit
Bye
bash-2.05#

为mysql的root账号设置密码:
bash-2.05# /usr/local/mysql/bin/mysqladmin -u root password "root用户的密码"
设置好后以后以root身份登录:
bash-2.05#/usr/local/mysql/bin/mysqladmin -u root -p

把/usr/local/mysql/bin加入到系统环境的PATH中。

在/etc/rc3.d中创建让mysql服务随机启动文件。
先touch S87mysql再编辑使其文件内容如下:
bash-2.05#more /etc/rc3.d/S87mysql
/usr/local/mysql/bin/safe_mysqld -u mysql &
再赋权限:
bash-2.05#ls -al /etc/rc3.d/S87mysql
-rwxr-xr-x   1 root     other         45  8月  2 14:57 /etc/rc3.d/S87mysql

#停止mysql  
/usr/local/mysql/bin/mysqladmin shutdown  
netstat -an|grep 3306

以上为mysql intel 8在solaris 9系统上的安装与测试过程.
作者: k_hill    时间: 2004-08-03 16:38
标题: mysql intel 8 在solaris9下最基本的安装与测试过程
不错不错
作者: solaris小兵    时间: 2004-08-03 16:48
标题: mysql intel 8 在solaris9下最基本的安装与测试过程
好东东!!!继续!!!
收藏先!!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2