0

help my, cant connect to online database heres's my connection php

<?php
$servername = "localhost";
$database = "databasename";
$username = "database username";
$password = "database password";


$conn = mysqli_connect($servername, $username, $password, $database);
?>

i already using database username and password same as cpanel provide, and all plain text with no symbol for password, but for the username and db name its always contain underscore

Example databasename and user

example_dbname

example_dbuser

and its say at error log like this

PHP Warning:  mysqli_connect(): (HY000/1045): Access denied for user '*example_user*'@'localhost' (using password: YES) in *path*/koneksi.php on line 8

the word between stars (*) i change for secure,

beside that, i already give the user all privilege for the database, i already try the username and the password for cpanel its self but still access denied

note: its my own website, its mean i am freely to change up whatever in cpanel menu

Ade Rizky
  • 3
  • 1

0 Answers0