How do I fix the error connecting Snort and BASE databases?

Click For Summary

Discussion Overview

The discussion revolves around troubleshooting an error encountered when connecting Snort to the BASE database. Participants explore potential causes and solutions related to database configuration, software compatibility, and authentication methods. The context includes technical setup on Ubuntu and issues with PHP and MySQL/MariaDB versions.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant reports an error connecting Snort to the BASE database, suspecting issues with the command used to secure the MySQL installation.
  • Another participant explains that the error message indicates a compatibility issue between PHP and MySQL/MariaDB authentication methods, particularly with PHP 7.3 and MariaDB 8.x.
  • It is suggested that upgrading to PHP 7.4 may resolve the issue, or alternatively, changing the authentication method in MariaDB using a specific SQL command.
  • A participant mentions that despite upgrading to PHP 7.4, the error persists and seeks further assistance.
  • Concerns are raised about the age of BASE software and its compatibility with current infrastructure, suggesting that it may be challenging to get it working properly.
  • Another participant proposes reinstalling on an older version of Ubuntu (16.x) and using MySQL instead of MariaDB as a potential solution.
  • One participant introduces H2 Database as an alternative, but another firmly states that BASE cannot work with H2.

Areas of Agreement / Disagreement

Participants express differing opinions on the best approach to resolve the connection issue, with no consensus on a definitive solution. Some suggest upgrading software, while others highlight the challenges posed by outdated components.

Contextual Notes

Limitations include potential dependencies on specific software versions, unresolved compatibility issues, and the reliance on outdated libraries within BASE.

rifal
Messages
2
Reaction score
0
I installed snort and I want to connect the database with BASE but an error occurs, I don't know where I went wrong, everything is running smoothly but not with BASE connection with the database

I suspect if I'm wrong when running the command:

# sudo mysql_secure_installation

what should i do to solve this problem please help me

Error (p)connecting to DB : snort@localhost

Check the DB connection variables in base_conf.php

= $alert_dbname : MySQL database name where the alerts are stored
= $alert_host : host where the database is stored
= $alert_port : port where the database is stored
= $alert_user : username into the database
= $alert_password : password for the username


Database ERROR:The server requested authentication method unknown to the client
 
Computer science news on Phys.org
rifal said:
Database ERROR:The server requested authentication method unknown to the client
This message indicates that MySQL (or MariaDB) is asking for the password to be sent from PHP in a format that PHP does not support. This is common with e.g. MariaDB 8.x and PHP 7.3. Given that PHP 7.3 reaches EOL in a few months, the best way to resolve this is to upgrade to PHP 7.4. Otherwise, you will need to tell MariaDB to use an old authentication method by executing the following command as root in the mysql terminal (substituting the correct username and password of course):
SQL:
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
 
  • Informative
Likes   Reactions: berkeman
pbuk said:
This message indicates that MySQL (or MariaDB) is asking for the password to be sent from PHP in a format that PHP does not support. This is common with e.g. MariaDB 8.x and PHP 7.3. Given that PHP 7.3 reaches EOL in a few months, the best way to resolve this is to upgrade to PHP 7.4. Otherwise, you will need to tell MariaDB to use an old authentication method by executing the following command as root in the mysql terminal (substituting the correct username and password of course):
SQL:
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
I run the configuration like the steps given here

https://www.linkedin.com/posts/vtfoundation_how-to-install-snort-ugcPost-6781345099180843008-OTwE

and i run it on ubuntu 20.04

I've upgraded the php version to php7.4 but the error is still the same, is there any other solution? because I have to solve this problem to finish my final project in university, I need your help :(
 
Last edited:
rifal said:
I've upgraded the php version to php7.4 but the error is still the same, is there any other solution?
The problem is that BASE is pretty old software (for instance the Pear and ADOdb libraries it uses are not well supported any more) and getting it to work on current infrastructure is tricky.

You could try running through the steps here: https://php.watch/articles/PHP-7.4-MySQL-8-server-gone-away-fix.

Or get some help from someone with more experience at this kind of thing who can log into your machine and check things out.

Or try reinstalling from scratch on a new Ubuntu 16.x install as that is the version your notes are for (and install MySQL instead of MariaDB).
 
There's absolutely zero chance of getting BASE to work with H2 I'm afraid.