• Resolved Oceanwatcher

    (@oceanwatcher)


    Firewall Cannot connect to WordPress database
    PHP SAPI CGI-FCGI
    Version 1.4.2 (security rules: 2015-05-22.1)

    NinjaFirewall detection : NinjaFirewall is loaded but returned error code #4

    User PHP INI : php.ini found – .user.ini found – Warning: you have more than one INI file

    DB_NAME: OK

    DB_USER: OK

    DB_PASSWORD: OK

    DB_HOST: OK

    table_prefix: OK

    Attempting to connect to the DB:
    Warning: mysqli::mysqli(): (HY000/1045): Access denied for user ‘xxxx’@’localhost’ (using password: YES) in /home/xxx/public_html/test2.php on line 53
    ERROR: Access denied for user ‘xxxxx’@’localhost’ (using password: YES)

    After installing, php.ini would not load the firewall. So I tried .user.ini instead. Now it loads the firewall, but I can not connect to the database. All credentials are ok and php.ini is ok.

    There is a good possibility security measures added by the hosting company is in play. Does the above info make any sense?

    Would love to try this solution – my installations should of course be as secure as possible 🙂

    https://ww.wp.xz.cn/plugins/ninjafirewall/

Viewing 1 replies (of 1 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi

    Can you check in your wp-config.php script if you have more that one “DB_PASSWORD” (or DB_USER) occurrence, for instance the one used by WordPress and another one commented-out ?

    Also, consider removing the unused “php.ini” as it may confuse PHP and some errors could occur.

Viewing 1 replies (of 1 total)

The topic ‘Cannot connect to WordPress database’ is closed to new replies.