InnoDB设置出现错误提示是什么意思?怎么解决??

MySql: ready for connections

000101 23:20:44 MySql: Shutdown Complete

000101 23:20:43 MySql: Normal shutdown
http://www.innodb.com/ibman.html
the InnoDB startup options listed in section 2 at
But to get good performance you should adjust for your hardware
innodb_data_file_path = ibdata1:10M:autoextend
section, for example,
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
to the [mysqld] section of init parameters in your my.cnf
skip-innodb
If you do not want to use transactional InnoDB tables, add a line
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.

---------------------------------------------------------------

呵呵,
如果你不想使用 InnoDB类型的表
你可以在你的my.ini文件中加入

[mysqld]
skip-innodb

不过你将不能使用InnoDB类型的表,
也就不能实现外部关键字约束,事务,行锁等功能了,

如果你希望使用InnoDB类型表,
请参照下列my.ini文件修改

[mysqld]

Uncomment the following rows if you move the MySQL distribution to another location

basedir =D:/mysql
datadir =D:/mysql/data
#tmpdir#=

临时文件存放目录

#bind-address=192.168.0.2

本机的IP地址

port=3306

所占用的IP端口

language =chinese

服务器返回信息语言

default-character-set =gb2312

服务器默认的字符集,加上后就支持中文字段,中文索引等

#timezone =GMT+ 8

时区北京

Uncomment the following if you want to log updates

log-bin = d:/mysql/log/123.log

二进制Log文件,用于镜像服务器

log =d:/mysql/log/sql.log

Log记录

local-infile =1

允许使用 LOAD DATA LOCAL

#socket =MySQL
skip-locking

set-variable = key_buffer=16K
set-variable = max_allowed_packet=1M
set-variable = thread_concurrency=4

CPU数目*2

set-variable = thread_stack=64K
set-variable = table_cache=4
set-variable = sort_buffer=64K
set-variable = net_buffer_length=2K
server-id = 1

Un comment the following if you are NOT using BDB tables

skip-bdb

Uncomment the following if you are using Innobase tables

#skip-innodb

以下的目录必须自己手动建立

innodb_data_home_dir = e:\mysql\ibdata
innodb_data_file_path = ibdata1:1000M

数据文件必须能容下数据和索引

set-variable = innodb_buffer_pool_size=50M

设置缓冲池大小为内存的 50 - 80 %

set-variable = innodb_additional_mem_pool_size=5M
innodb_log_group_home_dir = e:\mysql\ibdata\iblogs
innodb_log_arch_dir = e:\mysql\ibdata\iblogs

log_arch_dir 必须和 log_group_home_dir 一样

innodb_log_archive=0
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=10M

设置日志文件大小为缓冲池的 15%。

set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1

如果丢失最近的几个事务影响不大的话,设置 flush_log_at_trx_commit 为 0。

set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus