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

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
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
 
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';
 
Reply
  • 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).