欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

mysql中找不到my.ini文件的問題及解決

 更新時間:2022年08月26日 09:08:08   作者:m0_61083409  
這篇文章主要介紹了mysql中找不到my.ini文件的問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教

mysql找不到my.ini文件

問題描述

剛剛在修改mysql默認配置的時候,發(fā)現(xiàn)找不到my.ini文件。按照其他搬運工的說法,打開隱藏的文件也是不行。自己摸索了半天終于找到解決方案。

解決辦法

1、打開“隱藏文件”顯示:

2、在url哪里輸入: %ProgramData%

2.1、回車以后會得到如下結(jié)果,打開mysql文件夾

2.2、然后會得到如下

打開MySQLServer那個文件夾里面就會有my.ini文件了。

mysql免安裝版找不到my.ini配置文件

一直用的免安裝版本,突然有一天開發(fā)時控制臺一直報錯

Data source rejected establishment of connection, message from server: “Too many connections”

上網(wǎng)搜

說是要我修改最大連接,然后我左找右找沒找到my.ini/my-default.ini。

不管是c:\下的programData還是安裝目錄,所以直接新建一個使用。

直接新建文本文件就行,改后綴。

my.ini里面的內(nèi)容

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** 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.
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
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:\Software\MySql\mysql-8.0.26-winx64
datadir = D:\Software\MySql\mysql-8.0.26-winx64\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

需要注意的一點是

這里填自己安裝目錄。

不知道的話查詢一下:show variables like ‘datadir’;

指定一下

mysqld  --defaults-file="D:\Software\MySql\mysql-8.0.26-winx64\my.ini"

測試一下;修改最大連接

===>

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關文章

最新評論