mysql5的安装

时间:2007-08-22 10:38:59  来源:  作者:

1以下使用root身份
添加用户组和用户,mysql服务需要以mysql组的用户来执行
shell> groupadd mysql
shell> useradd -g mysql mysql

2释放压缩文件到/usr/local下
把压缩包放到/usr/local下
shell> cd /usr/local
shell> tar zxvf mysql-standard-5.0.27-linux-i686-glibc23.tar.gz
然后得到 一个文件夹mysql-standard-5.0.27-linux-i686-glibc23

3给这个巨长文件名的文件夹作个快捷方式,这样以后不用打那么长字了,呵呵
shell> ln -s mysql-standard-5.0.21-linux-i686-glibc23 mysql

4创建授权表
shell> cd /usr/local/mysql
shell> scripts/mysql_install_db --user=mysql

5更改许可权限
shell> cd /usr/local/mysql
shell> chown -R root  .
shell> chown -R mysql data
shell> chgrp -R mysql .

6启动mysql并且测试
shell> bin/mysqld_safe --user=mysql &
如果没有报错就是启动成功了
shell> bin/mysql
如果出现
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 5 to server version: 5.0.21-standard

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

mysql>
说明成功了 
 

文章评论

共有 位网友发表了评论 查看完整内容