Post Date: December 22, 2022
Last Updated: November 03, 2026
Introduction
Zabbix is an open-source monitoring solution used to monitor servers, network devices, virtual machines, cloud services, and other IT infrastructure components. It helps system administrators monitor essential performance metrics, including CPU utilization, memory usage, disk space, network traffic, and system availability.
Sometimes, administrators may lose access to the Zabbix web interface after forgetting their login credentials. In such situations, you can reset the Zabbix Admin password directly through the MySQL database to restore administrator access without using the web interface.
In this guide, we will explain how to reset Zabbix Admin password using MySQL on Ubuntu with step-by-step instructions. We will also cover database identification, password hash updates, and how to securely access the Zabbix monitoring dashboard after resetting the password.
Prerequisites
Before resetting the Zabbix administrator password, ensure that you have:
- Root or sudo access to the Ubuntu server.
- MySQL or MariaDB database access with sufficient privileges.
- Access to the Zabbix database.
- The Zabbix database name and configuration details.
- A recent backup of the Zabbix database.
Important: The SQL procedure below uses the password hash documented by Zabbix. It resets the administrator password to zabbix. You must change this default password immediately after logging in.
Implementation
Step 1: Log in to the Ubuntu Server
First, connect to your Ubuntu server using SSH:
ssh root@YOUR_SERVER_IP
Replace YOUR_SERVER_IP with your actual server IP address.
If you are using a non-root account, connect using:
ssh username@YOUR_SERVER_IP
Step 2: Identify the Zabbix Database
Before making database changes, identify the database configured for your Zabbix server.
Check the Zabbix server configuration:
sudo grep -E '^(DBName|DBUser|DBHost)=' /etc/zabbix/zabbix_server.conf
The output will display the configured database name and connection details.
For example:
DBName=zabbix DBUser=zabbix DBHost=localhost
In this example, the database name is zabbix.
Note: If your Zabbix installation uses a different configuration file or a separate frontend database configuration, verify the database settings before proceeding.
Step 3: Back Up the Zabbix Database
Before updating the administrator password, create a database backup.
Run the following command:
mysqldump -u root -p zabbix > zabbix_backup.sql
Enter your MySQL root password when prompted.
Replace zabbix with your actual database name if it is different.
The backup helps you recover the database if an unexpected issue occurs.
Step 4: Log in to MySQL
Connect to the MySQL database using an account with permission to update the Zabbix database.
mysql -u root -p
Enter your MySQL password to access the MySQL command-line interface.
Alternatively, connect directly to the Zabbix database:
mysql -u root -p zabbix

Step 5: Select the Zabbix Database
If you have not already connected directly to the database, select the Zabbix database:
USE zabbix;
You should receive a confirmation that the database has been selected.
Replace zabbix with your actual database name if necessary.

Step 6: Verify the Zabbix Admin Account
Before updating the password, verify that the administrator account exists.
For modern Zabbix versions, execute:
SELECT userid, username FROM users WHERE username = 'Admin';
The query should return the administrator account.
Note: Modern Zabbix versions use the username column. Older Zabbix installations may use a different database schema..
Step 7: Reset the Zabbix Admin Password
Now, execute the following SQL query to reset the administrator password:
UPDATE users SET passwd = '$2a$10$ZXIvHAEP2ZM.dLXTm6uPHOMVlARXX7cqjbhM6Fn0cANzkCQBWpMrS' WHERE username = 'Admin';
This is the official bcrypt hash provided in the Zabbix password-reset documentation.
After executing the query, the administrator password will be reset to:
Username: Admin Password: zabbix
Check the query result to confirm that one administrator record was updated.
Step 8: Verify the Password Update
Run the following query to verify that the administrator account exists:
SELECT userid, username FROM users WHERE username = 'Admin';
If the account is returned and the update affected the intended record, the database password reset is complete.
Step 9: Exit MySQL
After completing the database update, exit the MySQL command-line interface:
EXIT;
Step 10: Log in to the Zabbix Web Interface
Open your browser and access the Zabbix frontend:
http://YOUR_SERVER_IP/zabbix
If your installation uses a domain name or a different frontend URL, use the appropriate address.
Enter the following login credentials:

Username: Admin Password: zabbix
After successful authentication, navigate to the user profile settings and change the default password to a strong, unique password.
Security recommendation: Never continue using the default password after completing the recovery process.
Important Security Considerations
When resetting the Zabbix administrator password through MySQL, follow these security recommendations:
- Always back up the Zabbix database before modifying user records.
- Use an authorized MySQL account with the required database permissions.
- Verify the administrator username before executing the UPDATE statement.
- Use the bcrypt hash documented for your Zabbix version.
- Change the default password immediately after logging in.
- Avoid sharing database credentials or administrator passwords.
- Restrict access to the MySQL server and Zabbix frontend.
Troubleshooting Common Issues
1. Unknown column ‘username’
This error may occur when using a query that does not match the database schema of an older Zabbix installation.
Check your Zabbix version and inspect the users table structure:
DESCRIBE users;
Use the appropriate column names for your installed version.
2. Access denied for MySQL user
If MySQL displays an access-denied error, verify the database username, password, and permissions.
Try connecting with an authorized MySQL account that has permission to update the Zabbix database.
3. Unable to log in after resetting the password
Verify the following:
- The correct Zabbix database was updated.
- The administrator username is correct.
- The SQL UPDATE statement affected the intended account.
- The installed Zabbix version supports the documented password hash.
- You are accessing the correct Zabbix frontend.
Refer to the official Zabbix documentation for version-specific password recovery instructions.
FAQs
1. How can I reset the Zabbix Admin password using MySQL?
Log in to the Zabbix MySQL database and update the administrator’s password hash in the users table. For modern Zabbix versions, use the bcrypt hash provided in the official Zabbix password-reset documentation.
2. What is the default Zabbix Admin password after resetting it through MySQL?
When using the official SQL password-reset hash, the default administrator credentials become:
- Username:
Admin - Password:
zabbix
Change the password immediately after logging in.
3. Can I reset the Zabbix password without accessing the web interface?
Yes. If you have sufficient MySQL database privileges, you can reset the administrator password directly through the Zabbix database without accessing the web interface.
4. Does the MD5 password reset method work with modern Zabbix versions?
No. The MD5 password hashing method is outdated. Zabbix introduced bcrypt password hashing in version 5.0. Modern installations should use the supported bcrypt-based reset procedure.
5. Which MySQL table stores Zabbix user passwords?
Zabbix stores user account information and password hashes in the users database table. The password hash is stored in the passwd column.
6. Do I need root access to reset the Zabbix administrator password?
You need access to the Ubuntu server and a MySQL account with sufficient privileges to modify the Zabbix user table. MySQL root access is not mandatory if another authorized database account has the required permissions.
7. Will resetting the Zabbix Admin password delete monitoring data?
No. Updating the administrator’s password hash does not delete monitoring history, hosts, triggers, dashboards, or other monitoring configurations.
8. How do I access Zabbix after resetting the password?
Open the Zabbix frontend using your server IP address or configured domain name. Log in using the Admin username and the new password.
Conclusion
Knowing how to Reset Zabbix Admin Password using MySQL helps system administrators restore access to the Zabbix monitoring dashboard when they forget their login credentials.
By following this step-by-step guide, you can identify the Zabbix database, create a backup, update the administrator password hash, and successfully regain access to the Zabbix web interface on Ubuntu.
Always use the password reset method supported by your installed Zabbix version. After completing the Zabbix Admin password reset, log in with the updated credentials and immediately configure a strong, unique password to keep your monitoring environment secure.
Related Articles
How to Install Ubuntu Server and Zabbix on Raspberry Pi
How to Add Zabbix Agents, Configure Alerting and Monitor Your Infrastructure
Optimize Your Infrastructure Monitoring with Our Experts
Need professional assistance with Zabbix monitoring, configuration, or infrastructure management?
Pheonix Solutions can help businesses with Zabbix implementation, server monitoring, Zabbix agent configuration, alert setup, monitoring optimization, and infrastructure troubleshooting.
Whether you need help configuring Zabbix, monitoring server performance, managing alerts, or resolving monitoring issues, our technology team can help you identify the right solution for your infrastructure requirements.
Explore our DevOps and Cloud Services to learn more about our infrastructure and cloud solutions.
Need assistance with your Zabbix monitoring requirements? Contact our experts to discuss your project.
