mysql-5.0.67-linux-i686.tar.gz
安装过程:
su 到root 权限。
#tar -zvxf mysql-5.0.67-linux-i686.tar.gz
#mv mysql-5.0.67/ /usr/local/mysql
#cd /usr/local/mysql
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 -s full-path-to-mysql-VERSION-OS mysql
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/mysqld_safe --user=mysql &
查看日志:
#less /var/log/mysqld.log
#bin/mysqladmin -u root password 123456
# bin/mysql -u root -p
# bin/mysql -u root
使用mysql 提供的脚本
# cp /usr/local/mysql/support-files/mysql.server /usr/local/mysql/bin
# ./mysql.server start 或者#service mysqld start启动mysql
# ./mysql.server stop #service mysqld stop停止mysql
随系统自动启动
# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
# chkconfig --add mysql
修改mysql超级用户root的密码
# mysqladmin -u root -p password 123456
Enter password:
回车ok.
安装过程:
su 到root 权限。
#tar -zvxf mysql-5.0.67-linux-i686.tar.gz
#mv mysql-5.0.67/ /usr/local/mysql
#cd /usr/local/mysql
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 -s full-path-to-mysql-VERSION-OS mysql
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/mysqld_safe --user=mysql &
查看日志:
#less /var/log/mysqld.log
#bin/mysqladmin -u root password 123456
# bin/mysql -u root -p
# bin/mysql -u root
使用mysql 提供的脚本
# cp /usr/local/mysql/support-files/mysql.server /usr/local/mysql/bin
# ./mysql.server start 或者#service mysqld start启动mysql
# ./mysql.server stop #service mysqld stop停止mysql
随系统自动启动
# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
# chkconfig --add mysql
修改mysql超级用户root的密码
# mysqladmin -u root -p password 123456
Enter password:
回车ok.