MySQL   发布时间:2022-05-15  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了MySQL内存及虚拟内存优化设置大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,62,50);font-family:simsun;font-size:14px;">
<span style="line-height:30px;font-size:20px;">MysqL 优化调试命令


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
 


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
1、


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
@H_589_3@mysqLd --verbose --Help


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
这个命令生成所有@H_589_3@mysqLd选项和可配置变量的列表


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
2、


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
通过连接它并执行这个命令,可以看到实际上使用的变量的值:


<pre style="color:rgb(50,50);font-size:14px;line-height:21px;"><span style="font-family:'Courier New';">@H_346_2@mysqL> SHOW VARIABLES;
<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
还可以通过下面的语句看到运行服务器的统计和状态指标:


<pre style="color:rgb(50,50);font-size:14px;line-height:21px;"><span style="font-family:'Courier New';">@H_346_2@mysqL>SHOW STATUS
<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
使用@H_589_3@mysqLadmin还可以获得系统变量和状态信息:


<pre style="color:rgb(50,50);font-size:14px;line-height:21px;"><span style="font-weight:bold;"><span style="font-family:'Courier New';">sHell> @H_346_2@mysqLadmin variables
<pre style="color:rgb(50,50);font-size:14px;line-height:21px;"><span style="font-family:'Courier New';">sHell> @H_346_2@mysqLadmin extended-status
<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
sHell> MysqLadmin flush-table 命令可以立即关闭所有不使用的表并将所有使用中的表标记为已经关闭,这样可以有效释放大多数使用中的内存。FLUSH
TABLE
在关闭所有表之前不返回结果。


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
swap -s检查可用交换区


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
<span style="line-height:30px;font-size:20px;">@H_589_3@mysqL内存计算公式


<p style="border:0px;list-style:none;line-height:21px;color:rgb(50,50);font-family:simsun;font-size:14px;">
 


<div style="color:rgb(50,50);font-family:simsun;font-size:14px;line-height:21px;">

@H_565_122@mysqL used mem = key_buffer_size + query_cache_size + tmp_table_size
+ innodb_buffer_pool_size + innodb_additional_mem_pool_size
+ innodb_log_buffer_size
+ max_connections * (
read_buffer_size + read_rnd_buffer_size
+ sorT_Buffer_size+ join_buffer_size
+ binlog_cache_size + thread_stack
)

本图文内容来源于网友网络收集整理提供,作为学习参使用,版权属于原作者。
编程之家官方1群(满)
编程之家官方2群(满)
编程之家官方3群(满)
编程之家官方4群
编程之家官方5群(新)

大佬总结

以上是大佬教程为你收集整理的MySQL内存及虚拟内存优化设置全部内容,希望文章能够帮你解决MySQL内存及虚拟内存优化设置所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: