-3

ERROR LİKE THİS;

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /var/www/html/frontend/htdocs/cfg.php on line 2

Warning: mysqli_query(): Couldn't fetch mysqli in /var/www/html/frontend/htdocs/cfg.php on line 4

CFG.PHP (all)

 <?php
    class object {} 
    $CFG = new object();
    if ($_SERVER['SERVER_NAME'] == 'localhost') {
        $base_url = "http:/localhost/";
        $CFG->api_url = $base_url.'api/htdocs/api.php';
        $CFG->auth_login_url = $base_url.'auth/htdocs/login.php';
        $CFG->auth_verify_token_url = $base_url.'auth/htdocs/verify_token.php';
    } else {
        $base_url = "http://cxxxx.com";
    $CFG->api_url = 'http://api.cxxxxxxxx.com/api.php';
    $CFG->auth_login_url = 'http://auth.xxxxxxxxxx.com/login.php';
    $CFG->auth_verify_token_url = 'http://auth.cxxxxxxxxa.com/verify_token.php';
    }


    ?>

I can't find the mistake. I don't know what should I do?

Any help would be appreciated.

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345

1 Answers1

-1

Access denied for user 'root'@'localhost', That means your root password is not correct, Please check the password or create new user to connect to the mysql.

josdev
  • 81
  • 1
  • 11