碰到的问题汇总:
错误日志无法生效,看不到错误日志信息配置主从复制时,f权限为777时无法启动二进制日志log-bin=mysql-bin即,show master 始终为空当修改f权限为644时,此时mysql又无法启动解决办法:
从源头解决问题 ,此类问题肯定是数据库的配置文件有问题,当错误日志都不生效时,无法排查问题所在,此时需要还原f
[client]port = 3306sockeT = /tmp/mysql.sock[mysqld]port = 3306socket = /tmp/mysql.sockskip-external-lockingkey_buffer_size = 128Mmax_allowed_packet = 1Mtable_open_cache = 256sort_buffer_size = 1Mread_buffer_size = 1Mread_rnd_buffer_size = 2Mmyisam_sort_buffer_size = 8Mthread_cache_size = 8query_cache_size= 16Mthread_concurrency = 8max_connections = 300wait_timeout = 30interactive_timeout = 30max_connect_errors = 9long_query_time = 1tmp_table_size = 16M#log-bin=mysql-bin#binlog_format=mixed#server-id = 1[mysqldump]quickmax_allowed_packet = 8M[mysql]no-auto-rehash[myisamchk]key_buffer_size = 12Msort_buffer_size = 1Mread_buffer = 1Mwrite_buffer = 1M[mysqlhotcopy]interactive-timeout
还原时注意:
1. 一定要备份好原来的配置文件,大概率在某个配置项还有用2. 还原后启动失败并不意味着方案失败,而是要首先去查看错误日志文件(自己可以黏贴原来的配置地址)3. 只要错误日志生效了,只需要查看错误日志的提示信息,兵来将挡
附个人配置:
# mysql conf /etc/f# # Created by # # Last Updated .06.01# [mysqld]port = 3306datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockskip-external-lockinglog-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidkey_buffer_size = 128Mmax_allowed_packet = 1Mtable_open_cache = 256sort_buffer_size = 1Mread_buffer_size = 1Mread_rnd_buffer_size = 2Mmyisam_sort_buffer_size = 8Mthread_cache_size = 8query_cache_size= 16Mmax_connections = 300wait_timeout = 30interactive_timeout = 30max_connect_errors = 9long_query_time = 1tmp_table_size = 16Mserver-id=1log-bin=mysql-binbinlog-ignore-db=mysqlbinlog-ignore-db=infomation_schemabinlog-do-db=mytestdbbinlog_format=STATEMENT[mysqldump]quickmax_allowed_packet = 8M[mysql]no-auto-rehash[myisamchk]key_buffer_size = 12Msort_buffer_size = 1Mread_buffer = 1Mwrite_buffer = 1M[mysqlhotcopy]interactive-timeout
以上
MySQL配置文件无法生效 错误日志无法打印 f权限644无法启动 主从复制配置失效各式配置文件疑难杂症最终解决办法
如果觉得《MySQL配置文件无法生效 错误日志无法打印 my.cnf权限644无法启动 主从复制配置失效》对你有帮助,请点赞、收藏,并留下你的观点哦!