Hi all,
Looking to remove all depreciated mysql from my website.
Using the same settings, I am able to connect successfully when using my old mysql_connect:
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());
This works
However, I’m trying to change it to mysqli, using the following:
$this->connection = new mysqli(“localhost”, DB_USER, DB_PASS, DB_NAME);
if ($mysqli->connect_errno) {
echo “Failed to connect to MySQL: (” . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
This doesn’t work.
Error I get on the site:
ProxySQL Error: Access denied for user ‘1512256’@‘2a02:4780:bad:f00d::4’ (using password: NO)