- 論壇徽章:
- 0
|
1)將下面兩個安裝文件以二進(jìn)制方式FTP到linux主機(jī)的/tmp目錄
MySQL-client-community-5.0.45-0.rhel4.i386.rpm
MySQL-server-community-5.0.45-0.rhel4.i386.rpm
2)以root用戶登錄linux主機(jī),進(jìn)入/tmp目錄,在shell下執(zhí)行下列命令:
rpm –vih MySQL-server-community-5.0.45-0.rhel4.i386.rpm
rpm –vih MySQL-client-community-5.0.45-0.rhel4.i386.rpm
3)調(diào)整InnoDB數(shù)據(jù)庫引擎缺省表空間和日志空間大小,調(diào)整步驟如下:
在shell下執(zhí)行service mysql stop命令,停止MySQL服務(wù)
刪除/var/lib/mysql目錄下的ibdata1、ib_logfile0、ib_logfile1三個文件
在/etc目錄新建my.cnf文件,使之包含如下內(nèi)容:
[mysqld]
default-character-set=utf8
default-storage-engine=INNODB
transaction-isolation=READ-COMMITTED
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=200
query_cache_size=32M
query_cache_type=1
table_cache=512
tmp_table_size=16M
thread_cache_size=22
myisam_max_sort_file_size=1G
myisam_max_extra_sort_file_size=1G
myisam_sort_buffer_size=8M
key_buffer_size=8M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=208K
innodb_data_file_path=ibdata1:100M:autoextend
innodb_autoextend_increment=20M
innodb_log_file_size=20M
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=0
innodb_log_buffer_size=1M
innodb_buffer_pool_size=64M
innodb_thread_concurrency=8
[client]
default-character-set=utf8
在shell下執(zhí)行service mysql start命令,啟動MySQL服務(wù)
4)導(dǎo)入aps腳本
mysql -u root -p
本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u3/107531/showart_2154630.html |
|