Hey guys!
So I've been monitoring my Zabbix database size and I've noticed that is getting too big (I've just received the message that free disk space is less than 20% on the problems dashboard). So I've read that the best way to deal with the size of the DB is to implement partitioning and I've decided to give it a try. But first I would like to do a backup of my Zabbix database and configuration files so that I won't lose it all if things goes south. I've already done this once with mysqldump but now I'm having some issues because there is no space left on the virtual machine to make a dump for the database. So what I've tried to do is to run the mysqldump on another machine that have sufficient space, but I'm having some issues doing that. Here is the problem:
I'll call the VM that Zabbix is running as A and the VM that I would like to make de dump B. Machine's A IP = 10.100.100.242 and Machine's B IP = 10.100.52.5
1. Machine A and B can communicate just fine (they can ping one another);
2. There are no firewall rules on either one of the machines that is blocking the communication;
3. I've already changed the mysql.conf file and changed the bind-address to 0.0.0.0;
4. When I run the command "mysqldump -P3306 -h 10.100.100.242 -u zabbix -p zabbix > /home/zabbixbd/zabbixbd.sql" on machine B I get the following output error:
So I've read that I must create a new user, or grant access to the machine's B IP on machine A. But this is where it gets confusing...
I can log into mysql just fine on machine A (Zabbix Appliance) with the following command:
And then I use the password specified on may zabbix configuration file and log into mysql just fine.
But when I run
I get the following output:
And when I try to grant privileges to Machine B:
I get the output:
I don't know much about mysql but I'm thinking that I'm not logged in as root on mysql and that's why I cant grant any privileges, but I don't know how to login as root.
Can anyone give me a hand on this?
Thanks!
So I've been monitoring my Zabbix database size and I've noticed that is getting too big (I've just received the message that free disk space is less than 20% on the problems dashboard). So I've read that the best way to deal with the size of the DB is to implement partitioning and I've decided to give it a try. But first I would like to do a backup of my Zabbix database and configuration files so that I won't lose it all if things goes south. I've already done this once with mysqldump but now I'm having some issues because there is no space left on the virtual machine to make a dump for the database. So what I've tried to do is to run the mysqldump on another machine that have sufficient space, but I'm having some issues doing that. Here is the problem:
I'll call the VM that Zabbix is running as A and the VM that I would like to make de dump B. Machine's A IP = 10.100.100.242 and Machine's B IP = 10.100.52.5
1. Machine A and B can communicate just fine (they can ping one another);
2. There are no firewall rules on either one of the machines that is blocking the communication;
3. I've already changed the mysql.conf file and changed the bind-address to 0.0.0.0;
4. When I run the command "mysqldump -P3306 -h 10.100.100.242 -u zabbix -p zabbix > /home/zabbixbd/zabbixbd.sql" on machine B I get the following output error:
Code:
mysqldump: Got error: 1130: Host '10.100.52.5' is not allowed to connect to this MySQL server when trying to connect
I can log into mysql just fine on machine A (Zabbix Appliance) with the following command:
Code:
mysql -u zabbix -p zabbix
But when I run
Code:
SHOW GRANTS;
Code:
+------------------------------------------------------------+ | Grants for zabbix@localhost | +------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'zabbix'@'localhost' | | GRANT ALL PRIVILEGES ON `zabbix`.* TO 'zabbix'@'localhost' | +------------------------------------------------------------+ 2 rows in set (0.00 sec)
Code:
GRANT ALL ON *.* to [email protected] IDENTIFIED BY 'password';
Code:
GRANT ALL ON `zabbix`.* TO 'root'@'10.100.52.5' IDENTIFIED BY 'password';
Code:
ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)
Can anyone give me a hand on this?
Thanks!
Comment