我有一个3节点的mariadb集群(ubuntu 16.0.4 mariadb 10.3.7)在其中一个节点上执行systemctl restart mysql,我得到一条错误消息:
mariadb.service的作业失败,因为超时。有关详细信息,请参阅“systemctl status mariadb.service”和“jounalctl-xe”。
mariadb.services:单元进入失败状态。
systemctl status mysql返回
在此处输入图像描述
/etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc_messages_dir = /usr/share/mysql
lc_messages = en_US
skip-external-locking
bind-address = 192.168.3.15
max_connections = 100
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M
thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
myisam_recover_options = BACKUP
key_buffer_size = 128M
# open-files-limit = 2000
table_open_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
query_cache_limit = 128K
query_cache_size = 64M
log_warnings = 2
slow_query_log_file = /var/log/mysql/mariadb-slow.log
long_query_time = 10
log_slow_verbosity = query_plan
server_id = 1
log_bin = /var/log/mysql/mariadb-bin
log_bin_index = /var/log/mysql/mariadb-bin.index
binlog_format = ROW
expire_logs_days = 10
max_binlog_size = 100M
# slaves
# relay_log = /var/log/mysql/relay-bin
# relay_log_index = /var/log/mysql/relay-bin.index
# relay_log_info_file = /var/log/mysql/relay-bin.info
# log_slave_updates = 1
# replicate-do-db = DriveOn
# read_only
default_storage_engine = InnoDB
# you can't just change log file size, requires special procedure
# innodb_log_file_size = 50M
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
innodb_file_per_table = 1
innodb_open_files = 400
innodb_io_capacity = 400
innodb_flush_method = O_DIRECT
[galera]
# Mandatory settings
# wsrep_on=ON
# wsrep_provider=
# wsrep_cluster_address=
# binlog_format=row
# default_storage_engine=InnoDB
# innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
# bind-address=0.0.0.0
#
# Optional setting
# wsrep_slave_threads=1
# innodb_flush_log_at_trx_commit=0
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
# no-auto-rehash # faster start of mysql but no tab completion
[isamchk]
key_buffer = 16M
!include /etc/mysql/mariadb.cnf
!includedir /etc/mysql/conf.d/
/etc/mysql/conf.d/galera.cnf文件
[galera]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
# Galera Cluster Configuration
wsrep_cluster_name="Test_Cluster"
# wsrep_cluster_address="gcomm://"
wsrep_cluster_address="gcomm://192.168.3.18,192.168.3.19,192.168.3.15"
# Galera Synchronization Configuration
wsrep_sst_method=rsync
# Galera Node Configuration
wsrep_node_address="192.168.3.15"
wsrep_node_name="XXXXXXXX05"
非常感谢您的帮助。
谢谢您
4条答案
按热度按时间wgmfuz8q1#
$/var/log/mysql#namei-l/var/log/mysql/mariadb-bin.index
xcitsw882#
好。。。mysql的maiking/var/log/mysql-full-owner怎么样
$chown-r公司mysql:mysql /var/log/mysql
$mysqld\u safe—系统日志
$cat/var/log/syslog |尾-f
xxhby3vn3#
systemctl启动mariadb.service
jpadmin@afhschsdrvt05用法:~$sudo journalctl-xe
wf82jlnq4#
终于有时间来解决这个问题了,这是我目前得到的。
$mysqld\u safe—系统日志
$systemctl status mariadb.service服务
查看syslog可以获得更多信息$cat/var/log/syslog | tail-f