mysql5.7 为什么没有my.ini

# Do not set it larger than 30% of your ailable memory, as some memory

在老版本的MySQL 3.22中,MySQL的单表限大小为4GB,当时的MySQL的存储引擎还是ISAM存储引擎。但是,当出现MyISAM存储引擎之后,也就是从MySQL 3.23开始,MySQL单表限制就已经扩大到了64PB了(文档显示)。也就是说,从目前的技术环境来看,MySQL数据库的MyISAM存储 引擎单表大小限制已经不是有MySQL数据库本身来决定,而是由所在主机的OS上面的文件系统来决定了。

mysqlmyini在哪里_mysqlmyini详解mysqlmyini在哪里_mysqlmyini详解


mysqlmyini在哪里_mysqlmyini详解


Set root ;

而MySQL另外一个的存储引擎之一Innodb存储数据的策略是分为两种的,一种是共享表空间存储方式,还有一种是独享表空间存储方式。

# If the file-size would be bigger than this, the index will be created

当使用共享表空间存储方式的时候,Innodb的所有数据保存在一个单独的表空间里面,而这个表空间可以由很多个文件组成,一个表可以跨多个文件存在,所 以其大小限制不再是文件大小的限制,而是其自身的限制。从Innodb的文档中可以看到,其表空间的限制为64TB,也就是说,Innodb的单 表限制基本上也在64TB左右了,当然这个大小是包括这个表的所有索引等其他相关数据。

而当使用独享表空间来存放Innodb的表的时候,每个表的数据以一个单独的文件来存放,这个时候的单表限制,又变成文件系统的大小限制了。

mysql有好几个my.ini的配置文件

so ;

my.iniThis ensures that someone cannot guess ;配置文件的路径:面向已经安装好mysql的用户 找到mysql的环境变量配置路径: 图中,我的配置路径就是:E:Softwaremysql-8.0.19-winx64,有的是在Mysql的bin目录下,这都没有关系,无关大局。 前往对应的路径下,查看是否有my.ini配置文件: 我的里面没有该配置文件。故此,需要自己新建一个空白txt文档,更名为my.ini,放到该目录下,接下来配置配置文件的内容。

2.

my.ini的配置内容 利用自身的文本编辑器打开,记事本、Notepad++等均可,编辑: [mysqld] # 设置3306端口 port=3306 # 设置port = 3306mysql的安装目录

数据库密码在ini里哪个地方

# unneeded buffer pool flush activity on log file overwrite. Howr,

详细如下:

# allowed to at least 4096 in the variable "open-files-limit" in

1.首先打开my.ini,在my.ini的[mysqld]字段下方加入:skip-grant-tables,然后保存。

2.然后,以身份进入cmd。

3.重启mysinto the MySQL;ql服务,这时的mysql不需要密码即可登录数据库。

4.打开cmd,进到mysql安装目录的bin目录下,然后输入mysql,回车就可以直接进入mysql。

mysql如何查看自己数据库文件所在的位置

<–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止;

mysql存储数据的时候都会把数据文件存储到固定的位置,那么我们如何查看这个存储数据文件的位置在哪里那?下面我给大家分享一下。

重新安装之前 务必卸载干净 注册表也要清理干净

01

首先我们进入mysql的安装目录,如下图所示,打开my.ini文件

02

接下来在打开的my.ini文件中,我们找到datadir所在行,如current;下图所示,此行的路径

03

然后我们在路径输入框中粘贴此路径,回车即可进入数据文件所在的位置,如下图所示

04

如果你想修改数据文件的位置,那么直接修改my.ini文件中datadir对应的路径即可,如下图所示

mysql的my.ini问题。请教高手

mysql5.7 为什么没有my.ini

也就是说,那些带#号开头的都是说明性文字,跟配置文件无关的.

# How many threads we should keep in a cache for reuse. When a client

你只需要仔细检查每段#号后面跟着的 无#号开头的配置参数即可.

# 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 n if the

# connection limit has been reached.

max_connections=800

# Query cache is used to cache SELECT results and later return them

# without actual executing the same query once again. Hing the query

# "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 ry time, the query cache may result in a

# slowdown instead of a performance improvement.

query_cache_size=71M

# The number of open tables for all threads. Increasing this value

# increases the number of file descriptors that mysqld requires.

# Therefore you he to make sure to set the amount of open files

# section [mysqld_safe]

# Maximum size for internal (in-memory) temporary tables. If a table

# grows larger than this value, it is automatically converted to disk

# of them.

tmp_table_size=26M

# 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 he a lot of new

# connections. (Normally this doesn't give a notable performance

# improvement if you he a good thread implementation.)

thread_cache_size=38

# MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while

# 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

# large tables to use the slower key cache mod 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

# large tables to use the slower key cache mod to create the index.

myisam_sort_buffer_size=26M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables.

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

# Size of the buffer used for doing full table scans of MyISAM tables.

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

# Use this option if you he a MySQL server with InnoDB support enabled

# but you do not plan to use it. This will se memory and disk space

# and speed up some things.

#skip-innodb

# Additional memory pool that is used by InnoDB to store metadata

# rmation. If InnoDB requires more memory for this pure it will

# start to allocate it from the OS. As this is fast enough on most

# recent operating s, you normally do not need to change this

# value. SHOW INNODB STATUS will display the current amount used.

innodb_additional_mem_pool_size=5M

# disk at each commit, which offers full ACID behior. If you are

# willing to compromise this safety, and you are running all

# 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 approximay 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 approximay 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 he to flush it to disk. As it is flushed

# once per second anyway, it does not make sense to he it very large

# (n with long transactions).

innodb_log_buffer_size=3M

# 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 . Note that on 32bit s you

# might be limited to 2-3.5G of user ll memory per process, so do not

# set it too high.

innodb_buffer_pool_size=210M

# Size of each log file in a log group. You should set the combined size

# note that a larger logfile size will increase the time needed for the

# recovery process.

innodb_log_file_size=42M

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

port=3306

port=3306

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

max_connections=120

query_cache_size=32M

table_cache=256

tmp_table_size=9M

thread_cache_size=32

myisam_max_sort_file_size=100G

myisam_max_extra_sort_file_size=100G

myisam_sort_buffer_size=64M

key_buffer_size=128M

read_buffer_size=1M

read_rnd_buffer_size# of log files to about 25%- of your buffer pool size to oid=512K

innodb_additional_mem_pool_size=2M

innodb_flush_log_at_trx_commit=1

innodb_log_buffer_size=1M

innodb_buffer_pool_size=18M

innodb_log_file_size=10M

我的mysql是5.7.16版本,没有my.ini文件,直接修改的my-default.ini文件进入mysql的,求解决中文插入问题

# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.

插入的数据乱码有很多原因:

1、你要检查一下页面的编码和数据库设置的字符集是否一样,要么都是utf8,要么都是gbk的

2、如果点说的两边编码是统一的5、重启mysql,配置成功。,你可以在链接数据库的时候加上mysql_query("set names utf8")

3# If set to 1, InnoDB will flush (fsync) the transaction logs to the、加上之后还是不行的话,在检查你的页面编码,如果是utf8的话,请选择没有bom的utf8编码

4、以上都没问题的话,还出现乱码的话,修改mysql的配置文件,my.ini加上character-set-server=utf8,然后重启mysql服务就可以了

一般出现乱码的话,基本就是这些原因了

ubuntu my.ini在哪

Normally root should only be ;

cd /etc/mysql,ls,ll,看到my# Allocated per thread, if a full scan is needed.f,现在已经了一看见myf就可以了,不过要用ROOT用户,如果你没有打开root用户,还要打开,因为root是具有权限的!!

。。。请问是我配置错了还是什么原因,望高手指教!!!!

mysql5.6没有my.ini文件只有my-default.ini,怎么设置编码啊?急求,致为感谢!

INIto log into MySQL ;配置文件中,# 号的作用是注释.

mysql没有配置文件也可以启动,你可以把my-default.ini改名为m但是别人配置的MYSQL里的my.ini的内容就很少,,如下y.ini,然后放到mysql安装根目录,在[mysqld]下加上character-set-server=utf8

mysql8.0.13如何设置secure_file_priv,找不到my.ini

# key cache mod. This is mainly used to force long character keys in

安装完mysql-server ,

basedir =D:/mysql-5.6.14-win32

会提示可以运行mysql_secure_installation,运行mysql_secure_installation会执行几个设

innodb_thread_concurrency=8

置:

删除匿名账号;

取消root用户远程登录;

删除test库和对test库的访问权限;刷新授权表使修改生效;通过这几项的设置能够提高mysql库的安全,建议生产环境中mysql安装这完成后一定要运行一

次mysql_secure_installation,详细步骤请参看下面的命令;代码,代码如下:

[root@server1 ~]# ;

mysql_secure_installation;

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS ;

RECOMMENDED FOR ALL MySQL;

SERVERS IN PRODUCTION USE PLEASE READ EACH STEP ;

CAREFULLY;

In order to log into MySQL to secure it we'll need the ;

password for the root user If you've just installed MySQL;

and;

you hen't set the root password yet the password will be blank;

you should just press enter here;

Enter current password for root (enter for none)<–初次运行直接回车;

OK successfully used ;

password moving on;

Setting the root password ensures that nobody can log ;

password?[Y/n] <– ;

是否设置root用户密码,输入y并回车或直接回车;

New password: <– 设置root用户的密码;

Re-enter new password: <– 再输入一次你设置的密码;

Password updated ;

Reloading privilege tables;

By default a ;

MySQL installation has an anonymous user allowing anyone;

without hing to he a user account created for;

them. This is intended only ;

for testing and to make the installation;

go a bit oother. You should ;

remove them before moving into a;

production environment;

Remove anonymous ;

users [Y/n] <– ;

是否删除匿名用户,生产环境建议删除,所以直接回车;

allowed to connect from localhost;

at the root password from the network;

Disallow root login remoy;

[Y/n] ;

By default MySQL ;

comes with a database named 'test' that anyone can;

access This is also ;

intended only for testing, and should be removed;

before moving into a ;

production environment;

Remove test database and access to it [Y/n] <– 是否删除test数据库 直接回车;

Dropping test ;

database;

Success。