(一)MySQL 数据库的安装

#/usr/sbin/groupadd -g 27 mysql
#/usr/sbin/useradd -c "MySQL Server" -u 27 -d /usr/local/mysql -g mysql -s /bin/bash -M mysql

#tar zxvf mysql-5.0.80.tar.gz
#cd mysql-5.0.80

#CFLAGS="-O6 -mpentiumpro" CXX=gcc CXXFLAGS="-O6 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --sysconfdir=/etc --localstatedir=/var/lib/mysql --without-debug --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-extra-charset=all --with-pthread --enable-thread-safe-client --with-innodb --with-readline --with-embedded-server

#make
#make install

#cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 700 /etc/rc.d/init.d/mysqld

#cd ..
#rm -rf mysql-5.0.80

#/usr/local/mysql/bin/mysql_install_db --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysql.pid --skip-locking --port=3306 --socket=/var/lib/mysql/mysql.sock

#cd /usr/local/mysql

#chown -R root .
#chown -R mysql.mysql /var/lib/mysql
#chmod 755 /var/lib/mysql

#mkdir /var/run/mysqld
#chown mysql.mysql /var/run/mysqld

#/etc/rc.d/init.d/mysqld start (启动 mysql 数据库服务)

#ps aux |grep mysql (查看 mysql 服务是否启动正常)

root      2488  0.0  0.1   4728  1188 ?        S    18:27   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid
mysql     2523  0.0  2.6 229248 27740 ?        Sl   18:27   0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/lib/mysql/mysql.sock
root      2589  0.0  0.0   4116   620 pts/0    S+   19:06   0:00 grep mysql


最后编辑: 疯狂老头 编辑于2009-12-5 11:03
| 引用(0)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]