LINUX下mysql5.0.27的安装

LINUX下mysql5.0.27的安装

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

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: