• Support
  • Forums
  • Blogs

Unable to connect to Database Urgent! please

morihendmorihend

Big Time
Hello everybody,

I mad en error because i changed the root paswword to connect to my database thinking it wasn't used.
I would like to create a new database to collect ossim datum.
Unforntunately when i decided to access to my web page with the ossim admin, after having changed my root password, i had this message "Unable to connect to Database".
I don't know what to do ? Where can I modify the root password to make my web page works ?

Thanks in advance.

Rodolphe
Tagged:

Share post:

Best Answer

  • Answer ✓
    How did you change it, was it through the ossim_setup.conf file or through the command line?

    In /etc/ossim/ossim_setup.conf file is where it pull the database password from, if you changed it through some other means then edit this file with what you changed it to then run ossim-reconfig. 

    Otherwise did you happen to write down the original password before you changed it?

Answers

  • Hello hitman,

    I changed it through the command line because I thought ossim didn't use datebase. I thought it used files.
    I used this command lines : 
    mysqld --skip-grant-tables --skip-networking &
    mysql mysql -u root
    UPDATE user SET password=PASSWORD('newpassword') WHERE user="root";

    thanks in advance

    Rodolphe

  • You can configure the new password on the /etc/ossim/ossim_setup.conf file ...
  • Hello,

    I have put the same password in the ossim_setup.conf.
    I mad a ossim-reconfig.
    And now it's written "Unable to connect to OSSIM DB with config file x x settings, trying old settings".

    Is there another file I have to change ?

    Thanks
  • Did you put it back with the grant command?  Did you specify a host or use a wildcard(%)?
  • Hello,

    I have done nothing about grant command.

    Thanks for your help PacketInspector.




  • http://dev.mysql.com/doc/refman/5.0/en/grant.html

    You can test your auth with the mysql command like:  mysql -u root -p  also try mysql -u root -p -h 127.0.0.1  if one works and not the other than the grant statement needed the host added to it.
  • Hello,

    I have tried mysql -u root -p and after I wrote the password that I thought it was good but I received an denied connection.
    So I tried to change mysql root password with the one that I have in the ossim_setup.conf file.
    I have done :
    - 1) /etc/init.d/mysql stop
    - 2) mysqld_safe --skip-grant-tables --skip-networking &

    After it's written this : 

    LIOSSIM01:/var/lib/mysql# 140214 09:07:07 mysqld_safe Logging to '/var/lib/mysql/LIOSSIM01.err'.
    140214 09:07:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

    And nothing happened.
    I can get the focus to put another unix command.

    So I have opened the LIOSSIM01.err file and it's written this that is a little bit curious.

    140214  9:02:18 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    140214  9:02:18 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    140214  9:02:18 [Note] Server socket created on IP: '0.0.0.0'

    I don't know why it's trying to connect to 0.0.0.0 address.
    I think it should be 127.0.0.1.

    What do you suggest me ?

    Thanks in advance

    Rodolphe



  • Hello everybody,

    I solved my problem.
    Finally I succeed in change the Database root password.
    After, I put this command : /usr/bin/ossim-reconfig.
    I lose all my datum but i have access to the ossim web admin.

    Thanks to hitman, AndreMandelli and PacketInspector. 

This discussion has been closed.