centos5.4 64位下安装mysql5.5.14

1)        下载

 

wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/MySQL-client-5.5.14-1.rhel5.x86_64.rpm

wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/MySQL-devel-5.5.14-1.rhel5.x86_64.rpm

wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/MySQL-server-5.5.14-1.rhel5.x86_64.rpm

wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/MySQL-shared-5.5.14-1.rhel5.x86_64.rpm

 

2)        安装,注意是否要保留原始数据,不保留的话把下面的#去掉

#rm –rf /var/lib/mysql

rpm -ivh MySQL-server-5.5.14-1.rhel5.x86_64.rpm

rpm -ivh MySQL-shared-5.5.14-1.rhel5.x86_64.rpm

rpm -ivh MySQL-devel-5.5.14-1.rhel5.x86_64.rpm

rpm -ivh MySQL-client-5.5.14-1.rhel5.x86_64.rpm

 

1)        优化mysql

mkdir /var/lib/mysql/

Vi /etc/my.cnf

把前面的部分修改为:

[client]

#password       = your_password

port            = 3306

socket          = /var/lib/mysql/mysql.sock

default-character-set=utf8

# Here follows entries for some specific programs

 

# The MySQL server

[mysqld]

character-set-server=utf8

language=/usr/share/mysql/english/

port            = 3306

socket          = /var/lib/mysql/mysql.sock

skip-name-resolve

#skip-locking

 

key_buffer = 100M

max_allowed_packet = 1M

table_cache = 1200

sort_buffer_size = 16M

net_buffer_length = 64K

read_buffer_size = 200M

read_rnd_buffer_size = 100M

myisam_sort_buffer_size = 100M

query_cache_size=200M

query_cache_limit=64M

thread_cache_size=60

 

key_buffer_size=200M

table_open_cache=1000

table_cache=1200

thread_cache_size=60

query_cache_size=200M

query_cache_limit=200M

table_definition_cache=1200

myisam_data_pointer_size=7

delayed_queue_size=2000

preload_buffer_size=65536

delayed_queue_size=20

preload_buffer_size=1024

 

#innodb_read_ahead_threshold=2

 

innodb_buffer_pool_size=200M;

innodb_additional_mem_pool=16M;

thread_concurrency = 2

 

2)        启动mysql

Service mysql start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值