• 欢迎访问VPS岛网站,国外VPS,国内VPS,国外服务器,国内服务器,服务器主机,测评及优惠码,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群

mysql5.5.60二进制安装

mysql技术 wjw555 17次浏览 已收录 0个评论

系统centos6.8
安装过程如下

mkdir -p /home/mysql3307/{data,log,binlog,tmp}
useradd mysql -S /sbin/nologin -M
chown -R mysql.mysql  /home/mysql3307/{data,log,binlog,tmp}
wget http://ftp.kaist.ac.kr/mysql/Downloads/MySQL-5.5/mysql-5.5.60-linux-glibc2.12-x86_64.tar.gz
tar xf mysql-5.5.60-linux-glibc2.12-x86_64.tar.gz -C /usr/local
mv /usr/local/mysql-5.5.60-linux-glibc2.12-x86_64 /usr/local/mysql5.5
 ./mysql_install_db --datadir=/home/mysql3307/data --basedir=/usr/local/mysql5.5 --user=mysql --defaults-file=/home/mysql3307/my3307.cnf 
cd /usr/local/mysql5.5/bin/
 ./mysqld_safe --defaults-file=/home/mysql3307/my3307.cnf  &
./mysqladmin -uroot password 'testykJ(517' -S  /tmp/mysql3307.sock -P3307

my.cnf的配置文件内容如下:
配置文件如下:

[root@127 ~]# cat /home/mysql3307/my3307.cnf
[mysqld]
back_log = 2000
basedir = /usr/local/mysql5.5
binlog-format = row
character_set_server = utf8
datadir = /home/mysql3307/data
event_scheduler = ON
expire_logs_days = 1
innodb_autoinc_lock_mode = 1
innodb_buffer_pool_size = 1073741824
innodb_data_file_path = ibdata1:500M:autoextend
innodb_data_home_dir = /home/mysql3307/data
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_io_capacity = 2000
innodb_log_buffer_size = 8388608
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /home/mysql3307/data
innodb_max_dirty_pages_pct = 50
innodb_open_files = 1024
innodb_read_io_threads = 8
innodb_thread_concurrency = 20
innodb_write_io_threads = 8
innodb_lock_wait_timeout = 10
#innodb_buffer_pool_load_at_startup = 1
#innodb_buffer_pool_dump_at_shutdown = 1
key_buffer_size = 3221225472
innodb_log_file_size = 1G
local_infile = 1
log-bin = /home/mysql3307/binlog/mysql-bin
log_bin_trust_function_creators = 1
log_output = FILE
long_query_time = 1
log-error = /home/mysql3307/log/error.log
max_allowed_packet = 134217728
max_connect_errors = 1000000
max_connections = 2000
myisam_sort_buffer_size = 33554432
myisam_recover = 1
join_buffer_size = 8388608
tmp_table_size = 33554432
net_buffer_length = 8192
performance_schema = 1
performance_schema_max_table_instances = 200
pid-file = /home/mysql3307/mysqld.pid
port = 3307
query_cache_size = 0
query_cache_type = 0
read_buffer_size = 20971520
read_rnd_buffer_size = 16M
max_heap_table_size = 33554432
bulk_insert_buffer_size = 134217728
#relay-log = /home/mysql3307/log/mysql-relay.log
secure-file-priv = /home/mysql3307/tmp
server-id = 2331053307
skip-slave-start
skip_name_resolve
slave-load-tmpdir = /home/mysql3307/tmp
slow-query-log-file = /home/mysql3307/log/mysql-slow.log
slow_query_log = 1
socket = /tmp/mysql3307.sock
sort_buffer_size = 2097152
table_open_cache = 128
thread_cache_size = 50
tmpdir = /home/mysql3307/tmp
user = mysql
wait_timeout = 2880000
transaction_isolation=read-committed
long_query_time=1
sync_binlog=0
innodb_flush_log_at_trx_commit=0

###指定数据库同步
replicate_wild_do_table=test01.%
replicate_wild_ignore_table=information_schema.%
replicate_wild_ignore_table=performance_schema.%
replicate_wild_ignore_table=mysql.%
replicate_wild_ignore_table=test.%

[mysqld_safe]
log-error = /home/mysql3307/log/error.log
pid-file = /home/mysql3307/mysqld.pid

说明:记录在此处方便自己工作中快速查阅,同时也希望能帮助到需要此文档的同学们


VPS岛 的文章和资源来自互联网,仅作为参考资料,如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。丨 转载请注明mysql5.5.60二进制安装
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址