mysql etc下my.conf配置详情

简介

配置mysql  etc下my.conf配置详情如下

[client]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8mb4

[mysql]
prompt="MySQL [\d]> "
no-auto-rehash

[mysqld]
port = 3306
socket = /tmp/mysql.sock

basedir = /usr/local/mysql
datadir = /data/mysql
pid-file = /data/mysql/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1

init-connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4

skip-name-resolve
#skip-networking
back_log = 300

max_connections = 613
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 256
max_allowed_packet = 500M
binlog_cache_size = 1M
max_heap_table_size = 8M
tmp_table_size = 32M

read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 8M
join_buffer_size = 8M
key_buffer_size = 16M

thread_cache_size = 16

query_cache_type = 1
query_cache_size = 16M
query_cache_limit = 2M

ft_min_word_len = 4

log_bin = mysql-bin
binlog_format = mixed
expire_logs_days = 7

log_error = /data/mysql/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /data/mysql/mysql-slow.log

performance_schema = 0
explicit_defaults_for_timestamp

#lower_case_table_names = 1

skip-external-locking

#default_storage_engine = InnoDB
default-storage-engine = MyISAM
innodb_file_per_table = 1
innodb_open_files = 500
innodb_buffer_pool_size = 128M
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_thread_concurrency = 0
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 2M
innodb_log_file_size = 32M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 16M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1

interactive_timeout = 28800
wait_timeout = 28800

[mysqldump]
quick
max_allowed_packet = 500M

[myisamchk]
key_buffer_size = 16M
sort_buffer_size = 8M
read_buffer = 4M
write_buffer = 4M

总结!积累经验争取月薪过3万!

时间: 2024-07-31 14:29:22

mysql etc下my.conf配置详情的相关文章

Squid.conf配置详情

squid常用命令:/usr/local/squid/sbin/squid -z 初始化缓存空间/usr/local/squid/sbin/squid 启动/usr/local/squid/sbin/squid -k shutdown 停止/usr/local/squid/sbin/squid -k reconfigure 重新载入配置文件/usr/local/squid/sbin/squid -k rotate 轮循日志 #acl all src 0.0.0.0/0.0.0.0 and htt

apache下vhosts.conf配置多域名代码

<VirtualHost *:8081> DocumentRoot "E:\phpStudy\WWW\phpMyAdmin" ServerName www.sjk.com ServerAlias www.sjk.com <Directory "E:\phpStudy\WWW\phpMyAdmin"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow

Linux下PHP+MySQL+CoreSeek中文检索引擎配置

说明: 操作系统:CentOS 5.X 服务器IP地址:192.168.21.127 Web环境:Nginx+PHP+MySQL 站点根目录:/usr/local/nginx/html 目的:安装coreseek中文检索引擎,配置MySQL数据库访问接口,使用PHP程序实现中文检索. CoreSeek官方网站: http://www.coreseek.cn/ http://www.coreseek.cn/products/=%22/products-install/step_by_step/ h

(转)win7 64位下如何安装配置mysql

转载于 http://blog.csdn.net/heizistudio/article/details/9916093 1. MySQL Community Server 5.6.10 官方网站下载mysql-5.6.10-winx64.zip 2.解压到d:\MySQL.(路径自己指定) 3.在d:\MySQL下新建my.ini配置文件,内容如下: *****************配置文件开始********************* # MySQL Server Instance Con

VMware Linux 下 Nginx 安装配置 - nginx.conf 配置 [负载两个 Tomcat] (三)

首先启动Nginx 1. 转到 nginx 目录: /usr/local/nginx; 启动 nginx: /usr/local/nginx/nginx ubuntu 前要加 sudo; 关健配置 http 配置块下,一般设置在 zgip on 下: upstream localhost { #绿色对应 #ip_hash; server localhost:8090; server localhost:8080; } server / { location / { proxy_connect_t

CentOS6.4下Mysql数据库的安装与配置,导入数据库,授权远程ip

卸载掉原有mysql 因为mysql数据库在Linux上实在是太流行了,所以目前下载的主流Linux系统版本基本上都集成了mysql数据库在里面,我们可以通过如下命令来查看我们的操作系统上是否已经安装了mysql数据库 [[email protected] ~]# rpm -qa | grep mysql // 这个命令就会查看该操作系统上是否已经安装了mysql数据库 有的话,我们就通过 rpm -e 命令 或者 rpm -e --nodeps 命令来卸载掉 [[email protected

Linux学习之CentOS--CentOS6.4下Mysql数据库的安装与配置【转】

如果要在Linux上做j2ee开发,首先得搭建好j2ee的开发环境,包括了jdk.tomcat.eclipse的安装(这个在之前的一篇随笔中已经有详细讲解了Linux学习之CentOS(七)--CentOS下j2ee环境搭建),如果要开发web项目,我们当然可以安装一个myeclipse到Linux系统上去,这个安装方法和安装eclipse完全相同,就没有记录下来了,有了jdk.tomcat.eclipse我们就已经能进行我们的程序开发了,但是如果要做一个项目,哪怕是小的不能再小的项目都离不开数

linux系统下nginx安装目录和nginx.conf配置文件目录

linux系统下nginx安装目录和nginx.conf配置文件目录 1.查看nginx安装目录 输入命令 # ps  -ef | grep nginx 返回结果包含安装目录 root      2662     1  0 07:12 ?        00:00:00 nginx: master process /usr/sbin/nginx 2.查看nginx.conf配置文件目录 输入命令 # nginx -t 返回结果包含配置文件目录 nginx: the configuration f

windows下安装并配置mysql

前言:前面三篇文章将django的环境搭建完后,还只能编写静态网页,如果要用到数据库编写动态网页,那么还需要数据库 本章讲解mysql数据库的安装和配置 正文:mysql请登陆mysql官网下载.msi文件,然后在本地惦记安装,安装模式使用custom自定义路径,安装完后,采用如下步骤配置mysql(参考百度经验): 配置环境变量,在path中添加 ;E:\wamp\Apache24\mysql(这是你的mysql安装路径),然后在修改一下配置文件my-default.ini(mysql安装文件