Percona MySQL 5.5 Linux通用二进制包安装(CentOS 6.9)
发表于:2025-01-25 作者:千家信息网编辑
千家信息网最后更新 2025年01月25日,创建软件安装目录mkdir /mysql_software_55下载软件Percona官网的下载页面有两个二进制Tar包,分别对应不同的发行版本ssl100 - Debian/Ubuntussl101
千家信息网最后更新 2025年01月25日Percona MySQL 5.5 Linux通用二进制包安装(CentOS 6.9)创建软件安装目录
mkdir /mysql_software_55
下载软件
Percona官网的下载页面有两个二进制Tar包,分别对应不同的发行版本
ssl100 - Debian/Ubuntu
ssl101 - for CentOS 6 and CentOS 7
解压安装包
tar xvfz Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101.tar.gz -C /mysql_software_55/
创建mysql用户
useradd mysql
创建数据目录、日志目录和临时目录
mkdir -p /mysql_55_3306/data
mkdir -p /mysql_55_3306/log
mkdir -p /mysql_55_3306/tmp
创建错误日志
touch /mysql_55_3306/log/error.log
chown -R mysql.mysql /mysql_55_3306
编辑配置文件
vim /etc/my_55_3306.cn
初始化MySQL数据库的数据文件路径,并且创建系统表
删除Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101目录,将软件文件移动到上一级目录,否则初始化的时候会报错
cd /mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# mv * ..
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# cd ..
[root@MySQL01 mysql_software_55]# rmdir Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101/
执行初始化
[root@MySQL01 mysql_software_55]# ./scripts/mysql_install_db --user=mysql --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data/
WARNING: The host 'MySQL01' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
171214 9:56:46 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214 9:56:46 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9175 ...
OK
Filling help tables...
171214 9:56:47 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214 9:56:47 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9182 ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/mysql_software_55//bin/mysqladmin -u root password 'new-password'
/mysql_software_55//bin/mysqladmin -u root -h MySQL01 password 'new-password'
Alternatively you can run:
/mysql_software_55//bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /mysql_software_55/ ; /mysql_software_55//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /mysql_software_55//mysql-test ; perl mysql-test-run.pl
Please report any problems at
https://bugs.launchpad.net/percona-server/+filebug
Percona recommends that all production deployments be protected with a support
contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team's productivity.
启动 MySQL
[root@MySQL01 mysql_software_55]# bin/mysqld_safe --defaults-file=/etc/my_55_3306.cn &
[1] 21953
[root@MySQL01 mysql_software_55]# ps -ef|grep mysql
root 10302 10278 0 10:11 pts/1 00:00:00 su - mysql
mysql 10303 10302 0 10:11 pts/1 00:00:00 -bash
mysql 21952 10303 0 10:45 pts/1 00:00:00 tailf error.log
root 21953 1960 0 10:45 pts/0 00:00:00 /bin/sh bin/mysqld_safe --defaults-file=/etc/my_55_3306.cn
mysql 23005 21953 0 10:45 pts/0 00:00:00 /mysql_software_55/bin/mysqld --defaults-file=/etc/my_55_3306.cn --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data --plugin-dir=/mysql_software_55//lib/mysql/plugin --user=mysql --log-error=/mysql_55_3306/log/error.log --pid-file=/mysql_55_3306/data/MySQL01.pid --socket=/mysql_55_3306/tmp/mysql.sock --port=3306
root 23051 1960 0 10:46 pts/0 00:00:00 grep mysql
mkdir /mysql_software_55
下载软件
Percona官网的下载页面有两个二进制Tar包,分别对应不同的发行版本
ssl100 - Debian/Ubuntu
ssl101 - for CentOS 6 and CentOS 7
解压安装包
tar xvfz Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101.tar.gz -C /mysql_software_55/
创建mysql用户
useradd mysql
创建数据目录、日志目录和临时目录
mkdir -p /mysql_55_3306/data
mkdir -p /mysql_55_3306/log
mkdir -p /mysql_55_3306/tmp
创建错误日志
touch /mysql_55_3306/log/error.log
chown -R mysql.mysql /mysql_55_3306
编辑配置文件
vim /etc/my_55_3306.cn
- [client]
port = 3306
socket = /mysql_55_3306/tmp/mysql.sock
# The MySQL server
#######Basic#######
[mysqld]
server-id = 101
port = 3306
user = mysql
basedir = /mysql_software_55/
datadir = /mysql_55_3306/data
tmpdir = /mysql_55_3306/tmp
socket = /mysql_55_3306/tmp/mysql.sock
skip-external-locking
skip-name-resolve
default-storage-engine = INNODB
character-set-server = utf8
wait_timeout = 100
connect_timeout = 20
interactive_timeout = 100
back_log = 500
myisam_recover
event_scheduler = ON
#######binlog#######
log-bin = /mysql_55_3306/log/mysql-bin
binlog_format = row
max_binlog_size = 128M
binlog_cache_size = 2M
expire-logs-days = 5
#######replication#######
slave-net-timeout = 10
#rpl_semi_sync_master_enabled =1
#rpl_semi_sync_master_wait_no_slave = 1
#rpl_semi_sync_master_timeout = 1000
#rpl_semi_sync_slave_enabled = 1
skip-slave-start
log_slave_update = 1
relay_log_recovery = 1
#######slow log#######
slow_query_log = 0
slow_query_log_file = /mysql_55_3306/log/mysql_slow.log
long_query_time = 2
#######error log#######
log-error = /mysql_55_3306/log/error.log
general_log = 0
general_log_file = /mysql_55_3306/log/general_query.log
#######per_thread_buffers########
max_connections = 1024
max_user_connections = 1000
max_connect_errors = 10000
key_buffer_size = 10M
max_allowed_packet = 128M
table_cache = 3096
table_open_cache = 6144
table_definition_cache = 4096
sort_buffer_size = 512K
read_buffer_size = 512K
read_rnd_buffer_size = 512K
join_buffer_size = 512K
tmp_table_size = 64M
max_heap_table_size = 64M
query_cache_type = 0
query_cache_size = 0
bulk_insert_buffer_size = 32M
thread_cache_size = 64
thread_concurrency = 32
thread_stack = 256K
#######InnoDB#######
innodb_data_home_dir = /mysql_55_3306/data
innodb_log_group_home_dir = /mysql_55_3306/log
innodb_data_file_path = ibdata1:2G:autoextend
innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 1
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 512M
innodb_log_buffer_size = 10M
innodb_log_files_in_group = 3
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 10
innodb_sync_spin_loops = 40
innodb_max_dirty_pages_pct = 90
innodb_support_xa = 1
innodb_thread_concurrency = 0
innodb_thread_sleep_delay = 500
innodb_file_io_threads = 4
innodb_concurrency_tickets = 1000
log_bin_trust_function_creators = 1
innodb_flush_method = O_DIRECT
innodb_file_per_table
innodb_read_io_threads = 16
innodb_write_io_threads = 16
innodb_io_capacity = 2000
innodb_file_format = Barracuda
innodb_purge_threads = 1
innodb_purge_batch_size = 32
innodb_old_blocks_pct = 75
innodb_change_buffering = all
transaction_isolation = READ-COMMITTED
初始化MySQL数据库的数据文件路径,并且创建系统表
删除Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101目录,将软件文件移动到上一级目录,否则初始化的时候会报错
cd /mysql_software_55/Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# mv * ..
[root@MySQL01 Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101]# cd ..
[root@MySQL01 mysql_software_55]# rmdir Percona-Server-5.5.58-rel38.10-Linux.x86_64.ssl101/
执行初始化
[root@MySQL01 mysql_software_55]# ./scripts/mysql_install_db --user=mysql --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data/
WARNING: The host 'MySQL01' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
171214 9:56:46 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214 9:56:46 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9175 ...
OK
Filling help tables...
171214 9:56:47 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
171214 9:56:47 [Note] /mysql_software_55//bin/mysqld (mysqld 5.5.58-38.10) starting as process 9182 ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/mysql_software_55//bin/mysqladmin -u root password 'new-password'
/mysql_software_55//bin/mysqladmin -u root -h MySQL01 password 'new-password'
Alternatively you can run:
/mysql_software_55//bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /mysql_software_55/ ; /mysql_software_55//bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /mysql_software_55//mysql-test ; perl mysql-test-run.pl
Please report any problems at
https://bugs.launchpad.net/percona-server/+filebug
Percona recommends that all production deployments be protected with a support
contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team's productivity.
启动 MySQL
[root@MySQL01 mysql_software_55]# bin/mysqld_safe --defaults-file=/etc/my_55_3306.cn &
[1] 21953
[root@MySQL01 mysql_software_55]# ps -ef|grep mysql
root 10302 10278 0 10:11 pts/1 00:00:00 su - mysql
mysql 10303 10302 0 10:11 pts/1 00:00:00 -bash
mysql 21952 10303 0 10:45 pts/1 00:00:00 tailf error.log
root 21953 1960 0 10:45 pts/0 00:00:00 /bin/sh bin/mysqld_safe --defaults-file=/etc/my_55_3306.cn
mysql 23005 21953 0 10:45 pts/0 00:00:00 /mysql_software_55/bin/mysqld --defaults-file=/etc/my_55_3306.cn --basedir=/mysql_software_55/ --datadir=/mysql_55_3306/data --plugin-dir=/mysql_software_55//lib/mysql/plugin --user=mysql --log-error=/mysql_55_3306/log/error.log --pid-file=/mysql_55_3306/data/MySQL01.pid --socket=/mysql_55_3306/tmp/mysql.sock --port=3306
root 23051 1960 0 10:46 pts/0 00:00:00 grep mysql
目录
数据
文件
软件
日志
二进制
不同
下载软件
两个
数据库
时候
版本
用户
系统
路径
错误
页面
会报
发行
移动
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
fm2021如何更新数据库
互联网公司科技创新榜单
管理信息系统数据库管理系统
网狐棋牌 数据库说明
升腾服务器购买
阳江云服务器散热器多少钱
艾森娜服务器
mc宝可梦服务器 boss多
web应用服务软件开发
wds服务器部署
熹妃q传有哪些服务器
徐州软件开发制作公司
HP服务器价格
服务器交换机考什么证
河南拙金网络技术有限公司
油站平台司机端软件开发
科技互联网领域排名
如何降低数据库的访问量
浙江华为服务器虚拟化安装云主机
山东高速网络安全员
如何网络安全定级
网络安全专业和云计算哪个好就业
怎么设置显示无服务器连接
苏州程序软件开发收费报价表
备份数据库的表怎么样备份
成都软件进销存软件开发
服务器挂载网站
一分钟搭配ftp服务器
关于网络安全初中手抄报内容
怎么找到云服务器供应商