×

mysql为什么没有ini文件

mysql为什么没有ini文件(解压版mysql没有.ini文件的解决办法)

admin admin 发表于2024-01-19 03:12:29 浏览34 评论0

抢沙发发表评论

各位老铁们好,相信很多人对mysql为什么没有ini文件都不是特别的了解,因此呢,今天就来为大家分享下关于mysql为什么没有ini文件以及解压版mysql没有.ini文件的解决办法的问题知识,还望可以帮助大家,解决大家的一些困惑,下面一起来看看吧!

本文目录

解压版mysql没有.ini文件的解决办法

自己建一个,内容如下,便可成功初始化,生成data文件夹 default-character-set=utf8mb4 basedir=D:\mysqlzz\mysql-8.0.17-winx64 datadir=D:\mysqlzz\mysql-8.0.17-winx64\data port=3306 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES character-set-server=utf8mb4 performance_schema_max_table_instances=600 table_definition_cache=400 table_open_cache=256 default-character-set=utf8mb4

MySQL5.6+windows2008怎么没有my.ini配置文件

是有的my.ini配置一些服务参数的,必须有这个文件:查找路径:安装路径\MySQL\MySQL Server 5.6\my.inimy.ini配置内容:# 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.#port=3306default-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.## The TCP/IP Port the MySQL Server will listen onport=3306#Path to installation directory. All paths are usually resolved relative to this.basedir="D:/MySQL Server 5.0/"#Path to the database rootdatadir="D:/MySQL Server 5.0/Data/"# The default character set that will be used when a new schema or table is# created and no character set is defineddefault-character-set=gbk# The default storage engine that will be used when create new tables whendefault-storage-engine=INNODB# Set the SQL mode to strictsql-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=14M# 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 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=17M# 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=33M# 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=22M# 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=64Kread_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 ***# 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=40M# 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=10

mysql 为什么没有 my-default.ini 配置文件

有没有都没关系,所以mysql 没有 my-default.ini 配置文件。

配置文件是在用户登录一台基于Microsoft Windows XP、Windows 2000或Windows NT? Workstation的计算机上时,系统就会创建一个专用的配置文件。来保存用户的屏幕颜色、网络连接、打印机连接、鼠标设置及窗口的大小和位置等等。

在用户第一次登录到计算机上时被创建,这个本地用户配置文件被储存在计算机的本地硬盘驱动器上。任何对本地用户配置文件所作的更改都只对发生改变的计算机产生作用。

       漫游用户配置文件。一个本地配置文件的副本被复制及储存在网络上的一个服务器共享上。当用户每次登录到网络上的任一台计算机上时,这个文件都会被下载,并且当用户注销时,任何对漫游用户配置文件的更改都会与服务器的拷贝同步。漫游用户配置文件要求这台计算机是Windows NT域或Active Directory,的一个成员。

       强制用户配置文件。是一种特殊类型的配置文件,使用它管理员可为用户指定特殊的设置。只有系统管理员才能对强制用户配置文件作修改。当用户从系统注销时,用户对桌面做出的修改就会丢失。

编辑mysql配置文件my.ini 可我的mysql里边没有my.ini

mysql 数据库的安装可以分为两种方式:解压方式和安装方式。

两者的区别在于:如果是安装方式,通常会运行一个 向导 程序,当按照向导,一步步完成,mysql 会配置完成,并生成 my.ini。

而 解压 方式,解压完成后,并没有 向导 程序,因此需要手动完成 mysql 的配置,配置文件 mysql 提供了一个缺省的文件,如下图:

将上面的 my-default.ini(由于系统的设置,没有显示 .ini 的扩展名),复制(或直接修改)名为 my.ini 的文件即可。

mysql5.7 为什么没有my.ini

mysql5.7 为什么没有my.ini在老版本的MySQL 3.22中,MySQL的单表限大小为4GB,当时的MySQL的存储引擎还是ISAM存储引擎。但是,当出现MyISAM存储引擎之后,也就是从MySQL 3.23开始,MySQL单表最大限制就已经扩大到了64PB了(官方文档显示)。也就是说,从目前的技术环境来看,MySQL数据库的MyISAM存储 引擎单表大小限制已经不是有MySQL数据库本身来决定,而是由所在主机的OS上面的文件系统来决定了。而MySQL另外一个最流行的存储引擎之一Innodb存储数据的策略是分为两种的,一种是共享表空间存储方式,还有一种是独享表空间存储方式。当使用共享表空间存储方式的时候,Innodb的所有数据保存在一个单独的表空间里面,而这个表空间可以由很多个文件组成,一个表可以跨多个文件存在,所 以其大小限制不再是文件大小的限制,而是其自身的限制。从Innodb的官方文档中可以看到,其表空间的最大限制为64TB,也就是说,Innodb的单 表限制基本上也在64TB左右了,当然这个大小是包括这个表的所有索引等其他相关数据。而当使用独享表空间来存放Innodb的表的时候,每个表的数据以一个单独的文件来存放,这个时候的单表限制,又变成文件系统的大小限制了。

安装mysql没有my.ini文件

        打开cmd(记得”使用管理员身份“打开),如果没有配置环境变量,请cd(切换目录)到mysql程序下的bin文件夹下 执行命令  D:\mysql\mysql-5.7.29-winx64\bin "MySql"为服务名称,你的MysSql服务不一定是这个名称,可以打开电脑的服务窗口查看。 删除完成之后,最好去电脑的服务窗口看下,如果找不到MySql服务,说明已经已经删除成功。 如果还能看到MySql服务,可以手动右击选择”停止“,服务停止之后就会自动消失了。 在mysql程序的根目录下,新建一个my.ini空白文件,用记事本打开,将以下内容复制进去 # For advice on how to change settings please see ***隐藏网址*** # *** DO NOT EDIT THIS FILE. It’s a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. default-character-set = utf8mb4 default-character-set = utf8mb4 character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_bin init_connect=’SET NAMES utf8mb4’ # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir = D:\MySQL datadir = D:\MySQL\data port = 3306 # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. join_buffer_size = 128M sort_buffer_size = 16M read_rnd_buffer_size = 16M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES其中basedir 和 datadir 根据实际MySql安装的位置进行修改。 删除之前生成的data文件,如果有重要的数据表,请先备份好。 回到cmd,重新生成data文件。在bin目录下运行: mysqld --initialize-insecure --user=mysql安装MySql服务,同时设置绑定my.ini配置文件。命令: mysqld --install"MySql" --defaults-file="d:/mysql/my.ini" “MySql”是服务名称,80表示8.0版本,当然,也可以自己取别的名字。 ”..\my.ini“是新建的配置文件的位置,也可以写成绝对路径”D:\MySql\my.ini“。 如果提示安装成功,这时打开电脑的”服务“窗口,可以找到新添加的MySql80服务: 这里有两种启动服务的方式:1)服务窗口启动;2)cmd启动 cmd方式:bin目录下执行命令 net start mysql 如果启动不成功 这时可能是my.ini配置文件中的某些配置有问题。你可以修改ini文件内容,然后从头按步骤再试一遍。 删除了data文件和服务之后,之前的密码就失效了,所以需要重新设置密码。 bin目录下执行命令 mysql -u root -p 这时密码为空,不需要填写,直接回车: 如果这里没有登陆成功 (敲黑板)这里有个需要注意的地方,在8.0之后的版本,修改root用户密码的命令是: ALTER USER’root’@’localhost’IDENTIFIED WITH mysql_native_password BY’你的密码’; 之前的版本是: update mysql.usersetauthentication_string=password("你的密码")whereuser="root"; 命令:mysql》 exit 这里的命令和之前是一样的,就不写了,密码记得要填刚才设置的 如果修改后,重启服务报错 有一种可能:你修改的配置与服务初始化时的配置有冲突,这时只能从头开始,在初始化的时候绑定my.ini文件 。

mysql5.7没有.ini的文件

自己创建一个记事本把名字改成my.ini

将下面内容写在my.ini里面

 default-character-set= utf8basedir = C:\mysql-5.7.19-winx64datadir = C:\mysql-5.7.19-winx64\dataport = 3306server_id = 1character-set-server    = utf8init_connect=’SET NAMES utf8’log_timestamps=systemsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  Server = C:\mysql-5.7.19-winx64\bin\mysqld.exe

文章分享结束,mysql为什么没有ini文件和解压版mysql没有.ini文件的解决办法的答案你都知道了吗?欢迎再次光临本站哦!