当前位置:操作系统 > Unix/Linux >>

RedHat糸列Mysql-5.0.45的安装(原创)

# chmod 755 mysql-5.0.45.tar.gz
# tar -zxvf mysql-5.0.45.tar.gz -C /usr/src/
# cd /usr/src/mysql-5.0.45
# ./configure --prefix=/usr/local/mysql --with-charset=gbk --localstatedir=/usr/local/mysql/data
# make 
# make install
# groupadd mysql
# useradd mysql -g mysql
# cd /usr/local/mysql/bin
# ./mysql_install_db --user=mysql
 
# cd /usr/local/mysql 
# chown -R root .
# chown -R mysql data
# chown -R mysql data/ .
# chown -R mysql data/mysql/ .
# chgrp -R mysql .
# /usr/local/mysql/bin/mysqld_safe --user=mysql & 
# netstat -tnl |grep 3306
# /usr/local/mysql/bin/mysql -uroot -p
# show database;
# /usr/local/mysql/bin/mysqladmin -uroot password 6220104
# cp /usr/local/mysql/share/mysql/mysql.server  /etc/init.d/mysqld
# cd /etc/init.d/
# chmod +x mysqld
# chkconfig mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
# service mysqld stop
 
# cp /usr/local/mysql/bin/* /usr/bin/
到此mysql-5.0.45 安装完成,,
                                                 Ghan
                                                 2007年11月20     
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,