How To Change Zabbix Database Name4 min read
Zabbix database is very important. If you want to change the Zabbix database name. All the data on the Zabbix server is in its database. So the Zabbix database is very important. Then follow the steps below.
★ Monitor mysql Service In My Zabbix Server
★ How To Upgrade Zabbix Server From 3.2.6 To 3.4.1
Step #01: First, stop all the Zabbix services and then backup the database.
root@zabbix-server:~# service zabbix-server stop root@zabbix-server:~# service zabbix-agent stop root@zabbix-server:~# service zabbix-java-gateway stop
Step #02: Now back up your running database.
root@zabbix-server:~# mysqldump -u root -p zabbix_old > zabbix_old.sql
Type mysql root password for database backup.
Step #03: Now goto mysql and create new database name command below.
root@zabbix-server:~# mysql -u root -p
Type mysql root password.
Create new database with grant privilege.
mysql> create database zabbix_new character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix_new.* to zabbix_user@localhost identified by 'passw0rd'; mysql> flush privileges; cd database/mysql mysql -uzabbix_user -ppassw0rd zabbix_new < schema.sql mysql -uzabbix_user -ppassw0rd zabbix_new < images.sql mysql -uzabbix_user -ppassw0rd zabbix_new < data.sql \q
Step #04: The backup Zabbix database will be restored to the new database.
root@zabbix-server:~# mysql -u root -p zabbix_new < zabbix_old.sql
Step #05: Database information is provided in two files.
A file is a zabbix_server.conf config file and the other is a web zabbix.conf.php config file.
Now open and change new database information like as database name, database user and database password.
This is web config file.
root@zabbix-server:~# vi /etc/zabbix/web/zabbix.conf.php
Like as example below.
$DB['TYPE'] = 'MYSQL'; $DB['SERVER'] = 'localhost'; $DB['PORT'] = '0'; $DB['DATABASE'] = 'zabbix_new'; $DB['USER'] = 'zabbix_user'; $DB['PASSWORD'] = 'passw0rd';
And other config file.
root@zabbix-server:~# vi /etc/zabbix/zabbix_server.conf
Server config details below
DBName=zabbix_new DBUser=zabbix_user DBPassword=passw0rd
All settings are complete now starting services.
root@zabbix-server:~# service zabbix-server start root@zabbix-server:~# service zabbix-agent start root@zabbix-server:~# service zabbix-java-gateway start
Goto your browser and access via admin login.
Zabbix default user name and password:
User Name : Admin (‘A’ must be use capital)
Password : zabbix ( You can change any time)
If you need, you can see another post.
How To Check Mikrotik Router SNMP Service From Zabbix Server
Check Web Site URL From Zabbix Server
Zabbix Troubleshooting Tips
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!