MySQL 的 Daemon 启动参数
Jun 21, 2016 am 09:11 AMmysql
假设你的启动脚本是/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.
建议加入精华:)

인기 기사

인기 기사

뜨거운 기사 태그

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











데이터베이스에서 Java 열거 유형의 애플리케이션 시나리오는 무엇입니까?

PHP를 사용하여 MySQL 테이블에 데이터를 삽입하는 방법은 무엇입니까?

MySQL 8.4에서 mysql_native_password가 로드되지 않음 오류를 수정하는 방법
