linux mysql5.1配置_mysql-5.1.73 版本linux详细配置文件

本文提供了MySQL 5.1.73在Linux系统上的详细配置,包括客户端和服务器端设置,如端口、字符集、数据目录、连接数限制、缓冲区大小等。同时,还给出了在启动遇到问题时的解决方法,如设置权限和清空数据目录。
摘要由CSDN通过智能技术生成

[client]

port            = 3360

#socket          = /usr/local/mysql/data/mysql.sock

socket=/var/lib/mysql/mysql.sock

default-character-set=utf8

# MySQL server

[mysqld]

port            = 3360

character-set-server=utf8

init_connect='SET NAMES utf8'

#datadir=/usr/local/mysql/data

#socket          = /usr/local/mysql/data/mysql.sock

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

max-heap-table-size = 64M

thread-concurrency = 16

#ft-min-word-len = 4

#default-storage-engine = INNODB

#transaction-isolation = REPEATABLE-READ

#tmp-table-size = 64M

#bulk-insert-buffer-size = 64M

# *** NETWORK ***

back-log = 50

max-connections = 1024

max-user-connections = 0

max-connect-errors = 10

net_buffer_length = 8K

max-allowed-packet = 16M

# *** SESSION THREAD ***

thread-cache-size = 64

thread-stack = 192K

# *** TABLE CACHE ***

table-open-cache = 2048

sort-buffer-size = 8M

join-buffer-size = 8M

# ***  Replication related settings ***

server-id           = 1

#binlog-format       = mixed

#binlog-cache-size   = 32K

#max-binlog-size     = 512M

#sync-binlog         = 0

#innodb-support-xa  = 1

#log-bin             = mysql-bin

#log-bin-index       = mysql-bin.index

#relay-log           = mysql-relay-bin

#relay-log-index     = mysql-relay-bin.index

#expire-logs-days    = 10

#log-slave-updates   = 1

#skip-slave-start

# *** MyISAM Specific options ***

read-buffer-size = 2M

read-rnd-buffer-size = 16M

key-buffer-size = 1024M

myisam-sort-buffer-size = 64M

myisam-max-sort-file-size = 10G

myisam-repair-threads = 1

myisam-recover

# *** INNODB Specific options ***

innodb-buffer-pool-size = 384M

innodb-additional-mem-pool-size = 16M

innodb-log-buffer-size = 8M

innodb-log-file-size = 256M

#innodb-data-file-path = ibdata1:10240M:autoextend

innodb-file-per-table = 1

innodb-thread-concurrency = 16

innodb-flush-log-at-trx-commit = 1

[mysqldump]

quick

max-allowed-packet = 16M

[mysql]

no-auto-rehash

[myisamchk]

key-buffer-size = 512M

sort-buffer-size = 512M

read-buffer = 8M

write-buffer = 8M

[mysqlhotcopy]

interactive-timeout

[mysqld-safe]

open-files-limit = 60000

如果以上配置在第一次启动不了,先清空mysql数据库指定目录下的数据,然后在linux上执行以下命令:

setenforce 0

在重启mysql,此时应能正常启动

阅读(1911) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值