当前位置: 首页 > 知识库问答 >
问题:

为什么没有我的默认。MySQL压缩文件中的ini?

西门洛城
2023-03-14

我从这里下载MySQL ZIP Archive:https://dev.mysql.com/downloads/mysql/(Windows(x86,64位), ZIP Archive)

我从来没有使用zip文件安装。所以我遵循这个教程:https://www.youtube.com/watch?v=kJbwKQqwtoE

从youtube教程中,解压缩zip文件后,会出现my default。ini

但是当我提取zip文件时,我找不到默认的。ini

我怎么才能找到它?

共有2个答案

狄赞
2023-03-14

在新版本中,我发现没有必要创建我的。ini文件,只需运行初始化并启动服务器即可。但如果你喜欢我的。ini您可以复制粘贴以下内容:

[mysqld]
basedir="H:/program_files/mysql"
datadir="H:/program_files/mysql/data_dir"

实际上回答从RamRaider在评论(链接)是好的,你可以按照。

骆鸿运
2023-03-14

在基本文本编辑器中,您可以从我之前提供的链接中复制并粘贴一个示例ini文件,也可以将其复制到一个新的空白文本文件-另存为my。安装目录中的ini

你需要一行一行地浏览,因为目录路径和设置与我的系统相关,你需要更改它们。(例如C:/data/mySQL_数据库C:/wwwroot/certificates/dbcert

使用#注释掉设置,或者在需要使用设置时删除设置。

整个文件中有很多指导,所以花时间阅读它。

# 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 X.Y). 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 X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a 
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# 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
#default-character-set=utf8

[mysql]

default-character-set=latin1







# 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]

event_scheduler=ON


# The TCP/IP Port the MySQL Server will listen on
port=3306
#default-character-set=utf8

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files (x86)/MySQL/MySQLServer_5.5.8/"

#Path to the database root
#datadir=C:/Program Files (x86)/MySQL/MySQLServer_5.5.8/data/
datadir=C:/data/mySQL_Databases/v5.5.8_myISAM_data/








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

# 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=35M




# 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_sort_buffer_size=69M



# 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=256M



# 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=256K











#*** INNODB Specific options ***
innodb_data_home_dir="C:/data/mySQL_Databases/v5.5.8_innoDB_datafiles/"



# 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=16M



# 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=2M




# 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=512M



# 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=54M



# 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=18

#Enable this option only if you would like to use InnoDB tables.
#skip-innodb

#Start without grant tables. This gives all users FULL ACCESS to all tables!
#skip-grant-tables


#Paths to individual datafiles and their sizes.
innodb_data_file_path=ibdata1:10M:autoextend


#The maximum number of active connections for a single user (0 = no limit).
max_user_connections=200


#The number of seconds the server waits for activity on a connection before closing it

connect_timeout=28800

wait_timeout=1500

interactive_timeout=28800

max_allowed_packet = 32M

back_log = 1000


# Enable SSL for the Server #
# PHP must be 5.3.7 or greater to support ssl in pdo #
ssl=Off
ssl-key=c:/wwwroot/certificates/dbcert/server-key.pem
ssl-cert=c:/wwwroot/certificates/dbcert/server-cert.pem
ssl-ca=c:/wwwroot/certificates/dbcert/ca-cert.pem





#Log all queries that have taken more than long_query_time seconds to execute to file.
long_query_time=2

#Logs will be rotated after expire-log-days days
expire_logs_days=5

#Enter a name for the query log file. Otherwise a default name will be used.
#log

#Enter a name for the error log file. Otherwise a default name will be used.
#log-error

#Enter a name for the slow query log. Otherwise a default name will be used.
#log-slow-queries

#Log some not critical warnings to the log file.
log-warnings
 类似资料:
  • 问题内容: 我查看了JDK和Apache压缩库随附的默认Zip库,由于以下三个原因,我对它们不满意: 它们太臃肿了,API设计也不好。我必须写50行锅炉板字节数组输出,压缩输入,文件输出流和关闭相关流,捕捉异常和移动字节缓冲区自己?为什么我不能有一个像)和这样的简单API呢? 似乎通过压缩解压缩会破坏文件元数据,并且密码处理会被破坏。 另外,与我从UNIX获得的命令行zip工具相比,我尝试的所有库

  • Java中的本质上是不可靠的。具体地说,我对接口的最大问题是,它需要一个不定义方法本身的方法行为。因此,如果遍历一个列表,您必须使用反射来访问它定义的行为。然而,在Java8中,我们现在有了默认方法,现在我问为什么在中没有默认的方法。 我理解为什么接口不能默认对象方法,但是,这是一个明确的设计决定,所以可以做出例外。 我有点想弃用并将其内部代码更改为类似以下内容: 然后继续使用使作为中的默认方法的

  • 我正在使用Julia的ZipFile包来提取和处理csv文件。没问题,但是当我遇到zip文件中的zip文件时,我也想处理它,但是遇到了一个错误。 Julia ZipFile文档如下:https://zipfilejl.readthedocs.io/en/latest/ 对如何做到这一点有什么想法吗?

  • 问题内容: 我做了一些辅助功能: 问题是我的所有文件都没有被压缩!文件大小相同,实际上,扩展名已更改为“ .zip”(在本例中为“ .xls”)。 我在winXP sp2上运行python 2.5。 问题答案: 这是因为要求您指定压缩方法。如果未指定,则假定压缩方法为,该方法仅存储文件而不压缩文件。您需要将方法指定为。您将需要为此安装模块( 通常 默认情况下已安装)。

  • 问题内容: Java固有地被破坏了。具体来说,我与接口有关的最大问题是,它期望方法行为无法定义方法本身。因此,如果遍历列表,则必须使用反射来访问其定义的行为。但是,在Java 8中,我们现在有了默认方法,现在我问为什么在中没有默认方法。 我知道为什么接口不能使用默认的Object方法,但是,这是一个明确的设计决定,因此可以进行例外处理。 我有点设想过时,并将其内部代码更改为以下内容: 并且继续进行

  • 我正在尝试更新名为的数据库中名为的表。该表的主键是。 当我运行以下语句时: 我收到一个错误,上面写着“您正在使用安全更新模式,并且您试图更新一个没有使用键列的WHERE的表。” 我在谷歌上搜索了那个错误消息,大多数回复都是“你必须使用子句或关闭安全模式”。但正如您所看到的,我使用的是子句。如果我有子句,为什么会出现错误? MySQL服务器版本5.6。20