MySQL——配置文件(my.ini)

MySQL配置my.ini文件 my.ini文件中存储了数据库的文件地址,数据库数据存储地址以及登录密码等基础信息。sc delete mysql(注意,这里的mysql是你的数据库服务名称,不知道怎么看的win+R后输入services.msc回车,就能在名称那一列找到你的mysql名称)显示成功后在管理(win+R回车后输入services.msc,回车)里看一下,如果数据库在管理中仍然存在,右键选择停止。数据库在管理中消失。我的mysql目录下不允许生成新文件,所以我在别的地方新建my.ini,编辑好后直接复制到存放的目录下。 阅读详情

1、配置文件说明信息。

# CLIENT SECTION
# ----------------------------------------------------------------------
[client]
#password =1234

# pipe
# socket=mysql
# 设置mysql客户端连接服务端时默认使用的端口
port=3306

default-character-set=utf8
[mysql]
port=3306
# 设置mysql客户端默认字符集
default-character-set=utf8


# SERVER SECTION
# ----------------------------------------------------------------------
[mysqld]
# mysql服务端默认监听(listen on)的TCP/IP端口
port=3306

# 基准路径,其他路径都相对于这个路径;即MySQL的安装路径
basedir="D:\MySQL"

# mysql数据库文件所在目录
datadir="D:\Mysql\data"

# 服务端使用的字符集默认为8比特编码的utf-8字符集
character-set-server=utf8

# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

# SQL模式为strict模式
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# General and Slow logging.
log-output=NONE
general-log=0
general_log_file="WANGZHANGJIE.log"
slow-query-log=0
slow_query_log_file="WANGZHANGJIE-slow.log"
long_query_time=10

# Error Logging.
log-error="WANGZHANGJIE.err"

# mysql服务器支持的最大并发连接数(用户数)。但总会预留其中的一个连接给管理员使用超级权限登录,
# 即使连接数目达到最大限制。如果设置得过小而用户比较多,会经常出现“Too many connections”错误。
max_connections=100

# 查询缓存大小,用于缓存SELECT查询结果。如果有许多返回相同查询结果的SELECT查询,并且很少改变表,
# 可以设置query_cache_size大于0,可以极大改善查询效率。而如果表数据频繁变化,就不要使用这个,会适得其反
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_open_cache=2000

# 内存中的每个临时表允许的最大大小。如果临时表大小超过该值,临时表将自动转为基于磁盘的表(Disk Based Table)。
tmp_table_size=20M

# 缓存的最大线程数。当客户端连接断开时,如果客户端总连接数小于该值,则处理客户端任务的线程放回缓存。
# 在高并发情况下,如果该值设置得太小,就会有很多线程频繁创建,
# 线程创建的开销会变大,查询效率也会下降。一般来说如果在应用端有良好的多线程处理,这个参数对性能不会有太大的提高。
thread_cache_size=9

# mysql重建索引时允许使用的临时文件最大大小
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=39M


# Key Buffer大小,用于缓存MyISAM表的索引块。决定数据库索引处理的速度(尤其是索引读)
key_buffer_size=8M


# 用于对MyISAM表全表扫描时使用的缓冲区大小。针对每个线程进行分配(前提是进行了全表扫描)。
# 进行排序查询时,MySql会首先扫描一遍该缓冲,以避免磁盘搜索,提高查询速度,
# 如果需要排序大量数据,可适当调高该值。但MySql会为每个客户连接发放该缓冲空间,
# 所以应尽量适当设置该值,以避免内存开销过大。
read_buffer_size=64K
read_rnd_buffer_size=256K


# connection级参数(为每个线程配置),500个线程将消耗500*256K的sort_buffer_size。
sort_buffer_size=256K


# InnoDB用于存储元数据信息的内存池大小,一般不需修改
innodb_additional_mem_pool_size=2M


# 事务相关参数,如果值为1,则InnoDB在每次commit都会将事务日志写入磁盘(磁盘IO消耗较大),
# 这样保证了完全的ACID特性。而如果设置为0,则表示事务日志写入内存log和内存log写入磁盘的频率都为1次/秒。
# 如果设为2则表示事务日志在每次commit都写入内存log,但内存log写入磁盘的频率为1次/秒。


innodb_flush_log_at_trx_commit=1


# InnoDB日志数据缓冲大小,如果缓冲满了,就会将缓冲中的日志数据写入磁盘(flush)。
# 由于一般至少都1秒钟会写一次磁盘,所以没必要设置过大,即使是长事务。
innodb_log_buffer_size=1M

# InnoDB使用缓冲池来缓存索引和行数据。该值设置的越大,则磁盘IO越少。一般将该值设为物理内存的80%。
innodb_buffer_pool_size=97M

# 每一个InnoDB事务日志的大小。一般设为innodb_buffer_pool_size的25%到100%
innodb_log_file_size=48M

# InnoDB内核最大并发线程数
innodb_thread_concurrency=9

# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.
innodb_autoextend_increment=64M

# The number of regions that the InnoDB buffer pool is divided into.
# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,
# by reducing contention as different threads read and write to cached pages.
innodb_buffer_pool_instances=8

# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000

# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before
# it can be moved to the new sublist.
innodb_old_blocks_time=1000

# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.
innodb_open_files=300

# When this variable is enabled, InnoDB updates statistics during metadata statements.
innodb_stats_on_metadata=0

# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table
# in a separate .ibd file, rather than in the system tablespace.
innodb_file_per_table=1

# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.
innodb_checksum_algorithm=0

# The number of outstanding connection requests MySQL can have.
# This option is useful when the main MySQL thread gets many connection requests in a very short time.
# It then takes some time (although very little) for the main thread to check the connection and start a new thread.
# The back_log value indicates how many requests can be stacked during this short time before MySQL momentarily
# stops answering new requests.
# You need to increase this only if you expect a large number of connections in a short period of time.
back_log=70


# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and
# synchronize unflushed data to disk.
# This option is best used only on systems with minimal resources.
flush_time=0

# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use
# indexes and thus perform full table scans.
join_buffer_size=256K

# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the
# mysql_stmt_send_long_data() C API function.
max_allowed_packet=4M

# If more than this many successive connection requests from a host are interrupted without a successful connection,
# the server blocks that host from performing further connections.
max_connect_errors=100

# Changes the number of file descriptors available to mysqld.
# You should try increasing the value of this option if mysqld gives you the error "Too many open files".
open_files_limit=4110

# Set the query cache type. 0 for OFF, 1 for ON and 2 for DEMAND.
query_cache_type=0

# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the
# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization
# or improved indexing.
sort_buffer_size=256K

# The number of table definitions (from .frm files) that can be stored in the definition cache.
# If you use a large number of tables, you can create a large table definition cache to speed up opening of tables.
# The table definition cache takes less space and does not use file descriptors, unlike the normal table cache.
# The minimum and default values are both 400.
table_definition_cache=1400

# Specify the maximum size of a row-based binary log event, in bytes.
# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.
binlog_row_event_max_size=8K

# If the value of this variable is greater than 0, a replication slave synchronizes its master.info file to disk.
# (using fdatasync()) after every sync_master_info events.
sync_master_info=10000

# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000

# If the value of this variable is greater than 0, a replication slave synchronizes its relay-log.info file to disk.
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000


mysql my.ini、登录、用户相关操作、密码管理、权限管理、权限表,角色管理 mysql -h hostname | IP -P port -u username -p database -e “select 语句”; 阅读详情

相关推荐

【教程】MYSQL中my.ini配置文件内容解读

上一篇我们讲解了如何在win11下同时安装MYSQL5.7.44和MYSQL8.0.33,供不同的学习需求使用【环境配置教程】MYSQL----win系统本地同时安装MySQL5.7.xx、MySQL8.0.xx本篇讲解一下安装mysql过程中的my.ini配置文件中的详细内容[mysqld]# 基本设置basedir=D:\software\environment\mysql\mysql-8.0.33 # MySQL安装目录。

web13765607643的博客 1587

MySQL配置文件my.ini详解

其实大体可以分为两部分:客户端的参数、服务器参数。其中服务器参数里还包括 InnoDB存储引擎参数。

顺其自然~专栏 3万+

MySQL配置文件(my.ini)详解及示例

MySQL是一种常用的关系型数据库管理系统,它提供了一个名为my.ini的配置文件,用于定义和控制MySQL服务器的行为。在配置MySQL服务器之前,请确保备份原有的my.ini文件,并根据你的需求进行修改。[mysqld]:这是my.ini文件中最常见的部分,它包含了用于配置MySQL服务器的参数。[mysqlhotcopy]:该部分用于配置mysqlhotcopy命令行工具的选项。[mysqld_safe]:该部分用于配置mysqld_safe启动脚本的选项。

bug_syntax119的博客 2755

MySQL笔记(三)

MySQL安装 下载安装包 官网链接 安装 直接双击下载文件,进行安装。 这里引荐一篇大佬的文章 MySQL配置 基本配置已经在安装过程中完成了, 如果还想修改配置,只需要修改 my.ini 文件即可 [mysqld] port = 3306 socket = /tmp/mysql.sock #设置mysql的安装目录 basedir=F:\Hzq Soft\MySql Server 51GA #设置mysql数据库的数据的存放目录,必须是data,或者是\xxx-data datadir=F:\Hzq

weixin_46376562的博客 1984

Wordpress实战之第二章安装wordpress 软件需要的软件

使用下载并安装phpstudy面版工具 wget -O install.sh?https://notdocker.xp.cn/install.sh?&& sudo bash install.sh 2.安装成功如下 ==============运行状态========================= webpanel stop phpstudy running =================...

安全参透之旅 612

Unity特效序列帧输出全攻略:Recorder+Timeline保姆级教程(解决透明通道问题)

本文提供Unity特效序列帧输出的完整解决方案,重点讲解如何结合Recorder与Timeline工具,实现带透明通道的PNG序列帧高效输出。通过保姆级教程,详细解析摄像机隔离、层级设置、参数配置等关键步骤,并深度解决透明通道丢失等常见问题,帮助特效师和动画师打通引擎创作与后期合成的工作流。

tensorflowjs6的博客 430

【详记MySql问题】安装之后没有my.ini配置文件怎么办

Windows操作系统中,我们安装Mysql有两个选择:一是下载MSI点击运行,利用windows系统安装程序的方法按部就班的来安装;二是下载ZIP,解压出来就能立即使用。 在使用ZIP安装时,安装好之后默认是没有my.ini配置文件的: 当我们想修改数据库的配置信息如 wait_timeout、interactive_timeout、max_connections 或大小写敏感时,却找不到my.ini 配置文件。 虽然这时,还可以通过命令行来修改配置信息,但重启mysql后修改会失效,配置会回归默认值,

Acheng123的博客 3万+

通过arcmap制作的第一张流域图

需要知道,识别河流依次需要填洼,流向,流量,栅格计算器,河流链接,河网分级.通过卫星图确定河流入口,在入口处画一个点,注意不要与其他河流相交。随后是进行对河流的筛选使用con函数,筛选流量大于100的河流。我们使用镶嵌工具-->镶嵌至新栅格 将两个数据合并。填洼后如图,随后进行流向的获得.使用流向工具。首先导入准备好的数据,可见两张图片并非一体。教程参考b站up:爱画地图的boney。惊醒栅格河网矢量化,进行河流分级。输入表面栅格数据,等待后如图。本次制作的是双峰县的流域图。输入流向数据,输出后如图。

pianmian1的博客 2230

解决Mysql安装之后没有my.ini配置文件问题

【详记MySql问题大全集】三、安装之后没有my.ini配置文件怎么办 系列目录 一、安装MySql 二、安装并破解Navicat 三、没有my.in配置文件怎么办 四、设置MySql的大小写敏感 五、重置MySql登陆密码   之前说过,Windows操作系统中,我们安装Mysql有两个选择:一是下载M...

s_156的博客 2万+

实现单芯片2400bps 音频编解码方案

终于按照朋友的需求,帮他开发了一款单芯片集音频采集编码传送并接收解码播放功能的方案,交给快递公司邮寄给远在郑州的他.整个项目从开始定型到现在一个样机送出,整整花了1个月时间,感觉挺有成就感,挺有意思,工作是辛苦的,结果却是快乐的.现在将这中快乐的的心情与大家分享一下.    真个项目用一颗主控搞定,ARM9的,200KBytes 片内RAM,主频可以跑到300MHz,64pin LQFP封装

nyxsec的专栏 3684

光谱数据预处理综合

除了化学信息,光谱还包含其他不相关或不需要的信息,如电噪声,基质背景,杂散光,散射效应等。在用化学计量学方法建立校准模型时,利用预处理方法消除光谱数据中的无关信息和噪声是非常必要的。

qq_44204759的博客 5191

MySQL的配置文件my.cnf与my.ini

MySQL的配置文件my.cnf与my.ini

喵酱 9190

【大模型】SpringBoot整合LangChain4j实现RAG检索实战详解

SpringBoot整合LangChain4j实现RAG检索实战详解

congge 1万+

【MySQL篇】MySQL的my.ini配置文件位置

【MySQL篇】MySQL的my.ini配置文件位置 ​ 做个记录—【suy】 文章目录【MySQL篇】MySQL的my.ini配置文件位置一、在C盘的“ProgramData”隐藏文件1、文件资源管理器勾选“隐藏的项目”2、进入MySQL位置3、拷贝my.ini文件到MySQL安装路径二、my.ini简单配置max_allowed_packet配置大一点!!! 一、在C盘的“ProgramData”隐藏文件 默认在MySQL官网下的MySQL安装程序或程序压缩包,在安装路径下都是没有my.ini文件的,那

蘇小沐的电子数据取证博客 1万+

【YOLO】Mask Proto分支理解

Mask Proto分支通过解耦全局原型与实例参数,在保持YOLO实时性的同时实现精准分割。其技术核心在于利用多尺度特征生成可组合的原型,结合动态系数适应不同目标形态。未来可进一步融合Transformer的注意力机制,增强对复杂场景的建模能力。

浩瀚之水的专栏 476

3 路由引入

在大型企业网络中,网络规模十分庞大,选用单一的路由协议无法满足网络的需求,因此多种路由协议共存的情况十分常见。或者出于业务逻辑或行政管理的考虑,会在不同的网络结构中设计和部署不同的路由协议,使路由的层次结构更加清晰可控。路由引入是具有方向性的,将路由信息从路由协议A引入到路由协议B(A-to-B),则路由协议B可获知A中的路由信息,但是此时,A还并不知晓B路由协议中的路由信息,除非配置B-to-A的路由引入。表3-1:各种路由协议的优先级。通过路由引入,可以实现路由信息在不同路由协议间传递。

lwljh134的博客 621

mysql安装成功之后,没有找到my.ini配置文件怎么办

目录 1. 删除MySql服务# 2. 新建my.ini配置文件# 3. 重新生成data文件# 4. 重新安装mysql服务,同时绑定my.ini配置文件# 5. 启动服务# 5.1 服务窗口启动# 5.2 cmd命令启动# 6. 重新设置密码# 6.1 登陆mysql# 6.2 修改root用户密码# 6.3 退出MySQL# 6.4 使用修改后的密码重新登陆# 之前说过,Windows操作系统中,我们安装Mysql有两个选择: 一、是下载MSI点击运行,利用windows系

YANG1894625的博客 8823

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

mysql查找配置文件my.ini位置方法

见:https://blog.csdn.net/mayor125/article/details/54140454 https://jingyan.baidu.com/article/7e4409531f75292fc0e2efe7.html 个人备注:不显示文件类型时,my.ini 文件名就叫作 my, 文件属性才显示 ini。 找到 my 文件看属...

cuicui_ruirui的博客 2万+

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

mysql---配置文件my.ini或my.cnf的详解

一、配置文件my.ini或my.cnf的位置 1、Windows下MySQL的配置文件是my.ini,一般会在安装目录的根目录。 2、Linux下MySQL的配置文件是my.cnf,一般会放在/etc/my.cnf,/etc/mysql/my.cnf。如果找不到,可以用find命令查找。  (1)find /etc -name my.cnf   --在/etc目录下的文件my.cnf  (2...

qq_34802511的博客 2万+

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

mysql修改my.ini_MySQL配置文件(my.ini)详解

在《MySQL安装后的目录结构介绍》一节中,我们了解到 my.ini 是 MySQL 数据库中使用的配置文件,MySQL 服务器启动时会读取这个配置文件,我们可以通过修改这个文件,达到更新配置的目的。本节以 Windows 系统下的 my.ini 配置文件为样板,讲解 MySQL 配置文件中的参数。一般情况下,my.ini 在 MySql 安装的根目录下,也有可能在隐藏文件夹“ProgramDat...

weixin_29110051的博客 8105

mysql my.ini 配置_MySQL配置文件-my.ini

下面允许我介绍一下MySQL的my.ini配置文件:my.ini是什么?my.ini是MySQL数据库中使用的配置文件,修改这个文件可以达到更新配置的目的。my.ini存放在哪里?my.ini存放在MySql安装的根目录,如图所示:my.ini的具体内容介绍:1 # CLIENT SECTION2 # ------------------------------------------------...

weixin_36360005的博客 1438

windows下mysql配置文件my.ini的位置

首先对我的电脑/计算机右键,点击管理,出现如下界面: 由于我安装mysql的时候起的名字是mysql57,你们安装的时候只要找到mysql服务就行,右键选择属性,弹出窗口: 可以看到在可执行文件的路径是C:\ProgramData\MySQL\MySQL Server 5.7\my.ini,即mysql的配置文件在该目录下。 打开我的c盘,没有ProgramData这个文件夹,想到该...

5万+

mysql的配置文件my.ini 或者 my-default.ini 参考

做过好几个小项目,都优先使用mysql当数据库,文件小,操作简单(用navicat11,界面操作,贼不错),可移植性高,而且可powerDesinger(pdm)很契合。 曾经一度的折腾mysql的配置,权限到表级增删改查,现在贴出来一个ini配置文件,以后就不用到处找了,反正应付小项目基本够用 # For advice on how to change settings please se...

akxj2022的博客 2630

mysql 查找配置文件 my.ini 位置方法

见:https://blog.csdn.net/mayor125/article/details/54140454 https://jingyan.baidu.com/article/7e4409531f75292fc0e2efe7.html 个人备注:不显示文件类型时,my.ini 文件名就叫作 my, 文件属性才显示 ini。 找到 my 文件看属...

qqwangfan的专栏 2万+
上一篇: MySQL——InnoDB锁问题(六)
下一篇: MySQL——load语句导入数据
spring_model
博客等级 码龄11年 36粉丝 47原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值