[ZBX-24257] db.odbc - Access denied for user when using Macros Created: 2024 Mar 22 Updated: 2025 Jul 04 |
|
| Status: | Need info |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Frontend (F), Proxy (P), Server (S) |
| Affects Version/s: | 6.4.11 |
| Fix Version/s: | None |
| Type: | Incident report | Priority: | Trivial |
| Reporter: | Matheus Nunes | Assignee: | Zabbix Support Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | macros, mysql, odbc | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL 8 |
||
| Attachments: |
|
| Description |
|
Steps to reproduce:
Error:
** Error: Cannot connect to ODBC DSN: [SQL_ERROR]:[HY000][1045][[MySQL][ODBC 8.0(w) Driver]Access denied for user 'svc_zabbix'@'teste.local' (using password: NO)] Expected:
With Oracle I didn't have this problem and I use the same user and password
|
| Comments |
| Comment by Matheus Nunes [ 2024 Mar 22 ] |
|
In time, when I use TEST works in all situations: db.odbc.select[get_status_variables2,,"Driver=MySQL;Database=zabbix;Server=teste.local;UID=svc_zabbix;PWD=\{$MYSQL.PASSWORD}"] db.odbc.select[get_status_variables2,,"Driver=MySQL;Database=zabbix;Server=teste.local;"] |
| Comment by Jan Prusinowski (Inactive) [ 2025 Apr 25 ] |
|
Hello Matheus,
Have you tried:
db.odbc.select[get_status_variables2,,"Driver=MySQL;Database=zabbix;Server=teste.local;UID=svc_zabbix;PWD={$MYSQL.PASSWORD}"]
I believe the extra '/' before your macro is causing your issues. Let me know if it has fixed your issue.
Regards, Jan |
| Comment by Matheus Nunes [ 2025 Apr 25 ] |
|
Hello Jan, Same error.
But when I use "Test", it works. |
| Comment by Edgars Melveris [ 2025 Jun 25 ] |
|
Can you reproduce the problem on a supported version of Zabbix? 6.4 is no longer supported. |
| Comment by Matheus Nunes [ 2025 Jul 04 ] |
|
Hello Edgars, Same error occurs in version 7.0.15. |