Windows
bin\mysqld-nt --install # Install MySQL as a service NET START mysql NET STOP mysql bin\mysqld-nt --remove # remove MySQL as a service
Unix
# groupadd mysql # useradd -g mysql mysql # 源代码安装模式 # tar zxvf mysql-xxx.tar.gz # cd mysql-xxx/ # ./configure --prefix=/usr/local/mysql --localstatedir=/var/db/mysql # make # make install # 二进制安装模式 # cd /usr/local # gunzip < /path/to/mysql-xxx.tar.gz | tar xvf - # ln -s mysql-xxx mysql # cd /usr/local/mysql # scripts/mysql_install_db # chown -R root:mysql /usr/local/mysql # chown -R mysql PATH_TO_MYSQL_DB # cp surrport_files/mysql.server /etc/rc.d/init.d/mysqld # chmod a+x /etc/rc.d/init.d/mysqld # ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S98mysql # /etc/rc.d/init.d/mysqld start # 则启动进程: /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/ltcvs.pid --skip-locking
Copyright © 2006 WorldHello 开放文档之源 计划 |