I am making simple mysqli
connection to my database on Godaddy windows hosting, my code is as follows :
<?php
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
$host = 'localhost';
$user = 'root_user_name';
$password = 'root_user_pass';
$db = 'my_database';
$cxn = mysqli_connect($host,$user,$password) or
die(mysqli_connect_error()); // <<<<<< line 9
mysqli_select_db($cxn, $db ) or die(mysqli_connect_error());
die('test');
I am sure of the granted username and password as well as the database name, all my credentials are proper, though I am getting this error:
Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root_user_name'@'localhost' (using password: YES) in G:\path\to\file\index.php on line 9 Access denied for user 'root_user_name'@'localhost' (using password: YES)
I got this working on localhost with same database name and credentials using wamp server, I am not much into IIS server and windows hosting.. Any help will be appreciated.