I have a new openaudit install on RHEL6.7. The machine is dedicated to just doing inventories. I don't think the openaudit installation script created the proper mysql users. Does this sound feasible?


I've gotten it to the point where I can get the install script to run completely, but the web interface is giving me:


A Database Error Occurred

Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
Line Number: 346


Should I have a user in mysql for openaudit? I was expecting the installation script to take care of this for me.

mysql> use openaudit;

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show grants;


 Grants for root@localhost                                           |



| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION        |


2 rows in set (0.00 sec)

mysql> show grants for 'opexport'@'localhost';

ERROR 1141 (42000): There is no such grant defined for user 'opexport' on host 'localh

mysql> show grants for 'openaudit'@'localhost';
ERROR 1141 (42000): There is no such grant defined for user 'openaudit' on host 'localhost'
mysql> select host, user, authentication_string from mysql.user;
| host      | user      | authentication_string                     |
2 rows in set (0.00 sec)


A previous issue


I've blown away the installation and started over:

rm -rf /usr/local/open-audit
rm -rf /var/www/html/open-audit
rm -rf /var/www/open-audit
rm -rf /var/lib/mysql


Any suggestions? Is this the install script not doing mysql correctly or just user error? It's very possibly user error but I'm not sure how if the table is made but the user isn't.

Thanks for your time.

    CommentAdd your comment...

    2 answers



      The install script should create the database and user for you. The commands it runs are:

      mysql -u root -e "CREATE DATABASE openaudit;"
      mysql -u root -e "CREATE USER openaudit@localhost IDENTIFIED BY 'openauditpassword';"
      mysql -u root -e "GRANT ALL PRIVILEGES ON openaudit.* TO openaudit@localhost IDENTIFIED BY 'openauditpassword'; FLUSH PRIVILEGES;"
      mysql -u root openaudit -e "source /usr/local/open-audit/other/openaudit_mysql.sql"

      You can run the manually if need be.

      1. andguent

        Well, this might explain it. Thanks for your help, but I think Mysql 5.7.10 may have changed too much for your installer. {code} Server version: 5.7.10 MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE USER openaudit@localhost IDENTIFIED BY 'openauditpassword'; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements mysql> {code} I had to change 'openauditpassword' to something more complicated before mysql would allow it.

      2. andguent

        Also, for completeness sake, your commands above need a "use openaudit;" prior to the source line.

      3. andguent

        Wait wait wait, nevermind. I was copy-pasting between the quotes so I only had to login once. I bet if I wasn't too lazy to type my root sql password four times the source line would have worked.

      4. Mark Unwin

        Thanks for the response. We'll investigate MySQL 5.7 on RHEL 6.7 ASAP.

      CommentAdd your comment...


      I have the same problem.

      I tryed to log as openaudit with mysql console, and it work. But if I echoed the $params variable in Loader.php script, the var is empty. So I think there is the problem.

      1. Mark Unwin

        This issue is related to MySQL on RedHat not accepting our password. Your database credentials are set in /usr/local/open-audit/code_igniter/application/config/database.php If these are the same that you're using on the console - and the console works (as you said it does), please open a new Question instead of adding to this one. If they're not the same, feel free to change them.

      CommentAdd your comment...