mysql5.7更改了二进制日志保存的路径后,一直报权限错误,无法启动。
mysql 5.7 的配置文件如下:设置了log-bin的文件路径。
[client]
#password = your_password
port = 3652
socket = /tmp/mysql.sock
[mysqld]
#skip-name-resolve
binlog_cache_size = 32K
thread_stack = 256K
join_buffer_size = 2048K
query_cache_type = 1
max_heap_table_size = 128M
port = 3652
socket = /tmp/mysql.sock
datadir = /www/server/data
default_storage_engine = InnoDB
performance_schema_max_table_instances = 400
table_definition_cache = 400
skip-external-locking
key_buffer_size = 1024M
max_allowed_packet = 100G
table_open_cache = 512
sort_buffer_size = 1024K
net_buffer_length = 4K
read_buffer_size = 1024K
read_rnd_buffer_size = 768K
myisam_sort_buffer_size = 32M
thread_cache_size = 128
query_cache_size = 192M
tmp_table_size = 128M
sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
explicit_defaults_for_timestamp = true
#skip-name-resolve
max_connections = 1500
max_connect_errors = 100
open_files_limit = 65535
# 这里设置了开启二进制
log-bin=/www/backup/mysql_binlog/mysql-bin
binlog_format=mixed
server-id = 12345
expire_logs_days = 7
slow_query_log=1
slow-query-log-file=/www/server/data/mysql-slow.log
long_query_time=3
early-plugin-load = ""
innodb_data_home_dir = /www/server/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /www/server/data
innodb_buffer_pool_size = 2048M
innodb_log_file_size = 256M
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 4
innodb_write_io_threads = 4
[mysqldump]
quick
max_allowed_packet = 500M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 2M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeou
log-bin的目录权限如下:
但是启动报错了:
查看日志是报:/www/backup/mysql_binlog/mysql-bin.index' not found (Errcode: 13 - Permission denied)
,说是权限问题,但是检查目录权限都是mysql,设置为777也不可以。请问有哪个大神可以解答一下的。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论