`
bibiye
  • 浏览: 172869 次
社区版块
存档分类
最新评论
阅读更多

Q: 在本地计算机 无法启动MySQL服务 错误1067:进程意外中止
A: 5.0以上版本,my.ini放在安装目录下即要;以下版本放在windows目录下。
以下是5.0.16版本的备份:
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows you should keep this file in the installation directory
# of your server (e.g. C:\Program Files\MySQL\MySQL Server 4.1). To
# make sure the server reads the config file use the startup option
# "--defaults-file".
#
# To run run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQL41
#
#
# Guildlines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]

port=3306

[mysql]

default-character-set=gbk


# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306


#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/DB/mysql/"

#Path to the database root
datadir="D:/DB/mysql/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=100

# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0

# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256

# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=5M


# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before.  This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8

#*** MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_max_extra_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method.  This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=8M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=8M

# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K

# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=212K


#*** INNODB Specific options ***


# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb

# Additional memory pool that is used by InnoDB to store metadata
# information.  If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS.  As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=2M

# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=8M

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=10M

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8


分享到:
评论

相关推荐

    mysql-8.0.25(含my.ini)

    "mysql-8.0.25(含my.ini)"这个标题暗示了这个压缩包包含了MySQL 8.0.25的安装文件,以及一个重要的配置文件——my.ini。 my.ini文件是MySQL服务器在Windows操作系统中的默认配置文件,用于设定服务器启动时的各种...

    mysql的my.ini文件

    - 定期备份`my.ini`,以防意外改动导致服务异常。 - 在调整配置时,应逐步进行并监控服务器性能,避免一次性改动过多参数。 - 使用官方文档作为参考,确保配置选项的正确性。 总的来说,`my.ini`文件是MySQL配置...

    my.ini的压缩包

    在下载并使用这个`my.ini`压缩包时,应先备份原有的`my.ini`,以免误操作导致数据库服务无法正常启动。同时,参与讨论和分享经验,可以学习到更多实用的配置技巧和最佳实践,提升数据库管理技能。

    mysq - my.ini

    【标题】"mysqld - my.ini" 在MySQL数据库服务器的配置中,`my.ini`文件扮演着至关重要的角色。它是MySQL服务启动时读取的主要配置文件,用于定义服务器的各种参数和设置,如端口号、数据存储位置、字符集、缓存...

    MySQL配置文件my.ini样例分享

    在修改my.ini配置文件之前,请确保已备份原始文件,以防意外情况发生。 根据自己的实际需求,谨慎修改basedir和datadir等关键参数。 basedir = 您mysql安装的地址,如: F:\Program Files\mysql-8.0.18-winx64 ...

    mysql-5.6.31-winx64的my.ini配置文件

    在Windows平台上安装MySQL时,`my.ini`文件是配置数据库服务器的关键文件。这个文件用于定义MySQL服务器的启动参数和设置,以满足特定的系统需求。 `my.ini`文件通常位于MySQL安装目录下,对于winx64系统,如...

    my.ini文件for mysql

    MySQL是世界上最受欢迎的关系型数据库管理系统(RDBMS)之一,其配置文件`my.ini`对于数据库的管理和优化至关重要。在Windows系统中,`my.ini`文件是MySQL服务器启动时读取的主要配置文件,用于定义服务器的各项运行...

    MySQL数据库中的my.ini文件

    MySQL数据库是世界上最流行的开源关系型数据库管理系统之一,其配置文件`my.ini`在系统中扮演着至关重要的角色。这个文件是MySQL服务器启动时读取的配置文件,用于设定数据库的各项参数,以满足不同环境和性能需求。...

    最新MySQL5.6.10的配置文件(my.ini)及相应的批处理文件

    在这个版本中,`my.ini`配置文件扮演了核心角色,它定义了MySQL服务器的行为和设置。 `my.ini`文件是MySQL服务器的启动配置文件,它包含了各种参数,如服务器端口、数据存储位置、日志文件位置、最大连接数、默认...

    MySql 5.7.20安装及data和my.ini文件的配置

    本文详细介绍了如何在Windows系统上安装MySql 5.7.20版本以及配置其核心数据目录和配置文件my.ini。以下是一些详细知识点: 1. 安装MySQL: - 从MySQL官网(***)或者下载网站(如***)下载所需版本的MySQL安装包...

    Mysql5.7在windows7下my.ini文件加载路径及数据位置修改方法

    Mysql5.7在Windows7系统下配置和修改my.ini文件的路径以及数据文件(data)的存放位置是数据库管理过程中的一项基础工作。这项操作对于需要将数据库部署到特定位置以满足磁盘空间、安全、备份等要求的数据库管理员尤其...

    mysql5.5版本中的my.ini,数据库炸了的兄弟们可以试着下载下来替换下你的试试看

    数据库炸了的兄弟们可以试着下载下来替换下你的试试看,兄弟...注意,一定得是同样版本的mysql5.5版本的,还有就是替换前一定要给自己原先那个备份好,别到时候加入了我这个文件反而更加炸了。希望你们能早日解决问题。

    mysql默认编码为UTF-8 通过修改my.ini实现方法

    my.ini文件位于MySQL安装目录下,其中包含了服务器的配置信息,包括数据库的字符集设置等。修改my.ini文件中的相关设置项,可以指定MySQL使用的默认字符集,从而有效解决乱码问题。 操作步骤主要如下: 1. 首先,...

    window下mysql主从备份及切换

    E:\upupw2\MySQL\bin>mysqld --install mysql2 --defaults-file="E:\upupw2\MySQL\my.ini" Servicesuccessfullyinstalled. E:\upupw2\MySQL\bin>sc start mysql2 ``` #### 2. 启动第二个MySQL实例(从库) - *...

    windows配置mysql5.7的字符集为utf8mb4 ----my.ini

    版本:mysql5.7 环境:windows 备注:配置mysql的字符集为utf8mb4 *为了解决mysql乱码参考了几个博客,只能在此鸣谢一下所有提供有价值的博客作者,此文件就上传备份一下

    mysql5_7_19 winx64解压缩版安装配置教程_Mysql_脚本之家_files.zip

    1. **创建服务**: 运行`mysqld.exe --install MySQL57 --defaults-file="C:\path\to\my.ini"`命令,其中`my.ini`是MySQL配置文件的路径。 2. **启动服务**: 打开服务管理器(services.msc),找到MySQL57服务并启动...

    Windows下MySQL5.6查找my.ini配置文件的方法

    在Windows操作系统中,MySQL数据库的配置文件通常名为`my.ini`或`my.cnf`,它包含了MySQL服务器的启动参数、服务配置以及其他重要的设置。在MySQL 5.6版本中,寻找这个配置文件可能需要一些步骤,特别是如果你不记得...

    Android PANIC Could not openmy_avd.ini完美解决

    ### Android PANIC Could not open my_avd.ini 完美解决方案 #### 问题描述 在尝试启动Android模拟器时,遇到了“PANIC: Could not open: my_avd.ini”这一错误提示。这个问题通常出现在配置环境变量或安装路径不...

    mysql-8.0.24-winx64.zip

    5. **my.ini** 文件:这是一个非常重要的配置文件,描述了MySQL服务器的运行参数,如端口号、数据存储位置、字符集、初始化脚本等。描述中提到,这个版本的MySQL包含了my.ini,意味着它已经预设了一些基本的配置,但...

    mysql 的安装注意的问题

    MySQL的主要配置文件是`my.cnf`(Linux环境下)或`my.ini`(Windows环境下)。通过修改这些配置文件,可以调整MySQL的各种设置,比如最大连接数、缓存大小等。合理地配置这些参数能够显著提升MySQL的性能表现。 ###...

Global site tag (gtag.js) - Google Analytics