mysql
假设你的启动脚本是/etc/init.d/mysql
那么找到$bindir/safe_mysqld这行,加上如下参数
-O max_connections=1000 -O wait_timeout=500 -O interactive_timeout=500
当然,得根据你的实际情况加以修改,不过默认值对于我们公司这样负载的服务器是不可想象的……
现在,你的MySQL启动文件有可能看起来像这样:
............
$bindir/safe_mysqld --user=mysql --datadir=$datadir --pid-file=$pid_file -O max_connections=1000 -O wait_timeout=500 -O interactive_timeout=500&
............
修改完成之后,重启MySQL即可,注意一定要先使用mysqladmin shutdown 服务器。
推荐在my.cnf中配置这些参数。
如果你有MySQL的源代码版本,你可以在support-files目录下找到my-huge.cnf, my-large.cnf
分别打开看看,选择适合你的那个文件
抄一段话:
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is @localstatedir@) or
# ~/.my.cnf to set user-specific options.
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --help option.
建议加入精华:)

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

記事本++7.3.1
好用且免費的程式碼編輯器

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

SublimeText3漢化版
中文版,非常好用