mysql5的安装

开发者在线 Builder.com.cn 更新时间:2008-03-30作者:xliu 来源:CSDN

本文关键词: 安装 Mysql5 数据库

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>

说明成功了 
 

用户评论

  • 用户名
  • 评论内容