56,679
社区成员
发帖
与我相关
我的任务
分享
系统:WIN NT
mysql版本:mysql 5.1
内存使用:826M / 18168M
CPU使用:3%
[client]
port=3306
[mysql]
default-character-set=latin1
[mysqld]
port=3306
basedir="C:/Program Files/MySQL/MySQL Server 5.1/"
datadir="C:/Program Files/MySQL/MySQL Server 5.1/Data/"
default-character-set=latin1
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=100
query_cache_size=0
table_cache=256
tmp_table_size=103M
thread_cache_size=8
myisam_max_sort_file_size=100G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=205M
key_buffer_size=175M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=7M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=3499K
innodb_buffer_pool_size=339M
innodb_log_file_size=170M
innodb_thread_concurrency=18
skip-name-resolve
[client]
port=3306
[mysql]
default-character-set = utf8
[mysqld]
port=3306
basedir="D:\AppServ/MySQL"
datadir="D:\AppServ/MySQL/data/"
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
init_connect = 'SET collation_connection = utf8_general_ci'
init_connect = 'SET NAMES utf8'
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=16384
query_cache_size=0table_cache=256
tmp_table_size=9Mthread_cache_size=8
myisam_max_sort_file_size=100G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=17Mkey_buffer_size=10Mread_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
log-slow-queries=mysql-slow.log
log-error=mysql.errskip-innodbinnodb_additional_mem_pool_size=2Minnodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1Minnodb_buffer_pool_size=17Minnodb_log_file_size=10M
innodb_thread_concurrency=8
[client]
port=3307
[mysql]
default-character-set=utf8
[mysqld]
port=3307
basedir="C:/Program Files/MySQL/MySQL Server 5.1/"
datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"
default-character-set=utf8
default-storage-engine=INNODB
max_connections=800
query_cache_size=84M
table_cache=1520
tmp_table_size=30M
thread_cache_size=38
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=30M
key_buffer_size=13M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=10M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=5M
innodb_buffer_pool_size=474M
innodb_log_file_size=95M
innodb_thread_concurrency=8
ALTER TABLE `session` ENGINE = memory
mysql> desc `session`;
+-------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| userid | int(10) unsigned | NO | PRI | 0 | |
| ip | varchar(20) | NO | | NULL | |
| firstactive | int(10) unsigned | NO | | 0 | |
| lastactive | int(10) unsigned | NO | | 0 | |
+-------------+---------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
update `session` set lastactive=unix_timestamp() where userid='$userid' limit 1
update `session` set lastactive=unix_timestamp() where userid='$userid' limit 1
(玩家一进入游戏的网页就开始计入session在线表,然后一退出就从session表中删除记录,网页中使用Ajax每隔30秒发送一次HTTP请求一个update.php网页,来更新其最后在线时间)