首页 > 数据库技术 > 详细

Redhat Linux上mysql安装-binary package安装

时间:2016-03-05 14:50:19      阅读:287      评论:0      收藏:0      [点我收藏+]

前面mysql rpm安装包的安装方法,本文学下二制安装,其制安装更简单,二制是已编译过的代,可以直接解配置后使用,总结其特点就是

1.安装简单

2. 可以指定安装目录,比较灵活

3.一台服务器上可以安装多个MYSQL

但是存在问题是,已经编译过,性能显然不如源码编译安装的好,也不能灵活定制编译参数,代码已经被编译过,将其解压到一个目录下即可以看到其安装包中文件,具体文件目录保护如下内容:

Directory

Contents of Directory

bin, scripts

mysqld server,  client and utility programs

data

Log  files, databases

docs

MySQL  manual in Info format

man

Unix  manual pages

include

Include  (header) files

lib

Libraries

share

Miscellaneous  support files, including error messages, sample configuration files, SQL for  database installation

 

即安装:

shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz shell> ln -s full-path-to-mysql-VERSION-OS mysql

 

比起RPM安装包来,二制包安装需要手工建用户:

shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql shell> mkdir mysql-files
shell> chmod 750 mysql-files
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> bin/mysql_install_db --user=mysql    # Before MySQL 5.7.6
shell> bin/mysqld --initialize --user=mysql # MySQL 5.7.6 and up
shell> bin/mysql_ssl_rsa_setup              # MySQL 5.7.6 and up
shell> chown -R root .
shell> chown -R mysql data mysql-files
shell> bin/mysqld_safe --user=mysql & # Next command is optional shell> cp support-files/mysql.server /etc/init.d/mysql.server

 

这样就完成了安装啦,可以看到主要是用户权问题需要配置好。


本文出自 “Marvelyu's Notes” 博客,请务必保留此出处http://marvelyu.blog.51cto.com/471030/1747808

Redhat Linux上mysql安装-binary package安装

原文:http://marvelyu.blog.51cto.com/471030/1747808

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!