-2

I am using following code in cpanel:

$con = mysqli_connect("localhost","oprha_username","*******","database_final");

Output: 
Warning: mysqli_connect(): (HY000/1045): Access denied for user '

Or:

$con = mysqli_connect("ip","oprha_username","******","database_final");

Output: 
Warning: mysqli_connect(): (HY000/1045): Access denied for user '

But I have given all privileges to the user oprha_username from **

Database Size Privileged Users Actions

**

What can I do now?

Manwal
  • 22,994
  • 11
  • 59
  • 91
Asif Iqbal
  • 1,211
  • 1
  • 9
  • 15
  • Do not post your passwords here – Jens Oct 27 '17 at 05:33
  • Hey buddy, Anyone can access to your database, Its a great risk that you are publishing your database connection properties. If you are publishing original data here. – Dinidu Hewage Oct 27 '17 at 05:35
  • For a start, you could provide more details. – fancyPants Oct 27 '17 at 07:31
  • Possible duplicate of [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) – Progman Oct 27 '17 at 09:13

1 Answers1

1

Your mysql database name may be incorrect. Please recheck your database name. There may be white space in your database name. Also if you use WHM, you can create root password to access your database. Hope it will work.

Asif Iqbal
  • 904
  • 1
  • 7
  • 16