Mysql Query Cache Problem

Hi to all, yesterday I reinstalled a server in order to change the domain name and host name.
Everything worked fine imported backups and the server was up.

Centos 7 64 bit.

After a hard reset mariadb mysql is not starting any more:
journalctl -xe results ns1.olddomain.tld and ns2.olddomain.tld in all the errors list in terminal.

Googled about query cache flush but since the database server is down I can not use the mysql commands.

in fact this one was the second hard reboot, so it happened after adding the secondary DNS resolver

my.cnf:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

symbolic-links=0
innodb_file_per_table = 1
thread_concurrency = 8
query_cache_size = 32M
thread_cache_size = 8
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M
table_open_cache = 512
max_allowed_packet = 1M
key_buffer_size = 384M


[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

resolv.conf:
nameserver 127.0.0.1
nameserver 213.186.33.99
search ovh.net

What do do in this case? Can any one give any idea for a solution?
Thanks.

It seems like you’ve decided on a solution before understanding the problem. :wink:

You’ll need to look in the mysql or mariadb log (in /var/log/mariadb, probably) for clues about why it’s failing to start. journalctl -u mariadb or systemctl status mariadb may have more info.

journalctl -xe shows everything on the tail of the journal, which may be wholly unrelated to your problem. (I don’t know what systemctl recommends it when a service fails, since it’s easy to end up seeing nothing related to your problem there). -u tells it which unit to show you log entries for, and is more useful for troubleshooting (though there is a bug in some versions that cause it to miss recent entries, I dunno if CentOS 7 is impacted by that).

Thank you. I reinstalled it again cleared memory cache before virtualmin installation, but this time when I imported the backups from my backups server in Features and Settings selected -> Only those selected below … vy selecting all -> unchecked Records in DNS domain, except SOA and everything looks fine now.

EDIT: :smiley: again the same problem so strange.
so 5 minutes ago I just added scondary dns in kimsufi.com panel looks like resolver IP is cached its possible?

 chown mysql:mysql -R /var/lib/mysql/*
 chmod 755 -R /var/lib/mysql/*

restarted normal now.