登录
首页 >  数据库 >  MySQL

一文详解CentOS percona-server5.5的rpm如何安装

来源:SegmentFault

时间:2023-01-12 10:26:21 207浏览 收藏

积累知识,胜过积蓄金银!毕竟在##column_title##开发的过程中,会遇到各种各样的问题,往往都是一些细节知识点还没有掌握好而导致的,因此基础知识点的积累是很重要的。下面本文《一文详解CentOS percona-server5.5的rpm如何安装》,就带大家讲解一下MySQL知识点,若是你对本文感兴趣,或者是想搞懂其中某个知识点,就请你继续往下看吧~

首先下载安装包:

wget https://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.35-rel33.0/RPM/rhel6/x86_64/Percona-Server-client-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm && wget https://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.35-rel33.0/RPM/rhel6/x86_64/Percona-Server-devel-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm && wget https://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.35-rel33.0/RPM/rhel6/x86_64/Percona-Server-server-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm && wget https://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.35-rel33.0/RPM/rhel6/x86_64/Percona-Server-shared-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm   && wget https://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.35-rel33.0/RPM/rhel6/x86_64/Percona-Server-shared-compat-5.5.35-rel33.0.611.rhel6.x86_64.rpm

然后安装rpm包:

rpm -ivh MySQL-server-5.5.34-1.linux2.6.x86_64.rpm rpm -ivh MySQL-client-5.5.34-1.linux2.6.x86_64.rpm rpm -ivh MySQL-devel-5.5.34-1.linux2.6.x86_64.rpm rpm -ivh MySQL-shared-5.5.34-1.linux2.6.x86_64.rpm rpm -ivh MySQL-shared-compat-5.5.34-1.linux2.6.x86_64.rpm

期间可能会报asio的错,这时需运行yum -y install libaio* 安装。
 如报 conflicts with file from package mysql-libs类似冲突,可以执行yum -y remove mysql-libs* 移除冲突包

groupadd mysql && useradd -g mysql mysql mkdir /data/mysql -p  &&  chown -R mysql.mysql /data/mysql/ mysql_install_db --datadir=/data/mysql  && chown -R mysql.mysql /data/mysql/

编辑/etc/my.cnf

[mysql] prompt=[\h][\u]@\d\r:\m:\s> no-auto-rehash [client] port=3306 socket=/data/mysql/mysql.sock [mysqld] user=mysql port=3306 slow_query_log_file=mysql.slow log-bin=mysql-bin binlog-format=STATEMENT skip-name-resolve log-error=mysql.err default-storage-engine=INNODB character-set-server=utf8 long_query_time=1 slow_query_log=1 innodb_data_file_path=ibdata1:100M:autoextend innodb_log_file_size=1G innodb_file_per_table=1 datadir=/data/mysql/ innodb_data_home_dir=/data/mysql/ innodb_log_group_home_dir=/data/mysql/ pid-file=/data/mysql/mysql.pid socket=/data/mysql/mysql.sock innodb_buffer_pool_size=512M

然后启动:

/etc/init.d/mysql start

理论要掌握,实操不能落!以上关于《一文详解CentOS percona-server5.5的rpm如何安装》的详细介绍,大家都掌握了吧!如果想要继续提升自己的能力,那么就来关注golang学习网公众号吧!

声明:本文转载于:SegmentFault 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>