Ad Widget

Collapse

Error on switching databases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EduardoAran
    Junior Member
    • Jan 2024
    • 3

    #1

    Error on switching databases

    Hello guys.

    I have been using zabbix server and database all in one single virtual machine, but I want to change the location of my database to another virtual machine that has a diferent ip address. First I created a dump of my old database, pass it into the new virtual machine and loaded (it should be working fine), butn the moment I rerite the /etc/zabbix/web/zabbix.conf.php with my new ip and port 3306, zabbix stops working.

    What am I doing wrong?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Web config is not the only config. Server config has to be changed also...

    Comment


    • EduardoAran
      EduardoAran commented
      Editing a comment
      Thanks for the answer, but i also did that, sry for not telling you. In the "/etc/zabbix/web/zabbix.conf.php" I did this:

      $DB['TYPE'] = 'MYSQL';
      $DB['SERVER'] = '192.168.30.192';
      $DB['PORT'] = '3306';
      $DB['DATABASE'] = 'zabbix';
      $DB['USER'] = 'zabbix';
      $DB['PASSWORD'] = 'password';

      And in the "/etc/zabbix/zabbix_server.conf" just added the DBHost informacion (for my case it would be DBHost = 192.168.30.192). As an extra I also added the DBPort = 3306, I dont know if it is necesary.

      Have a nice day
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #3
    So you changed the settings. If things still do not work, take a look in logfiles, it may display some error messages.

    Comment


    • EduardoAran
      EduardoAran commented
      Editing a comment
      Thank you very much for all the help
      Thanks to the logs I could see that zabbix was asking me for a more updated version of my MariaDB than the one I already had, so the only thing I had to do was update it, and at the same time open the port that I didn't have to open it.
      Have a good day
Working...