Using cpanel I created the following:
New database called: sil_accts_1
username called: sil_admin1
password called: mypass213
I then used the SELECT SHA1(‘mypass213’); to get an encrypted password t1125gghke21
In a auth00.php page I have
<?php
// Enable us to use Headers
ob_start();
$con = mysqli_connect("localhost","sil_admin1","t1125gghke21","sil_accts_1");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
I get the infamous Warning: mysqli_connect(): (HY000/1045): Access denied for user ‘sil_admin1’@‘localhost’ (using password: YES) in /home/myfile/public_html/auth00.php on line 7
Failed to connect to MySQL: Access denied for user ‘sil_admin1’@‘localhost’ (using password: YES)
- Am i inserting the wrong information in the con statement?
- Is it better to not use cpanel for the connection now that that php under 7 is now outdated? I do see many
posts about this but nothing that specifically addresses my issue
The connection info is altered for security purposes